Simple API to be used in "Node Sorocaba - Meetup #1".
You need to have installed Node.js
To install dependencies enter project folder and run following command:
npm install
npm start
Listing all characters
http GET http://localhost:5000/characters
https://secure-thicket-39526.herokuapp.com/characters
{
"name": "James Gordon",
"ocupation": "Police Commissioner",
"quote": "Because he's not our hero.",
"firstAppearance": 1938
}
docker build -t gotham/node-web-app
docker run --rm -i -t -p 49160:8080 gotham/node-web-app
If you want to debug, using a shell you can get the <container id>
by running:
docker ps
Then, to get the shell
docker exec -it <container id> /bin/bash
docker stop <container id>