Microservice example using ubuntu, node.js, and express.
256
Micro service example using ubuntu, node.js, and express.
Example usage:
docker run -d -w /microservice -p 9000:3000 mrichman/node-microservice npm start
Get the IP of your docker host:
docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
Use the URL to test your microservice:
curl -v http://192.168.99.100:9000/api/sayhello
GET /api/sayhello HTTP/1.1 Host: 192.168.99.100:9000 User-Agent: curl/7.43.0 Accept: /
< HTTP/1.1 200 OK < X-Powered-By: Express < Content-Type: text/html; charset=utf-8 < Content-Length: 20 < ETag: W/"14-HSmnMKah+RckfI3sY8uLcw" < Date: Wed, 13 Jan 2016 01:57:10 GMT < Connection: keep-alive <
Content type
Image
Digest
Size
143.3 MB
Last updated
over 10 years ago
docker pull mrichman/node-microservice