Public Repository

Last pushed: 2 years ago
Short Description
Microservice example using ubuntu, node.js, and express.
Full Description

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

  • Trying 192.168.99.100...
  • Connected to 192.168.99.100 (192.168.99.100) port 9000 (#0)

    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
    <

  • Connection #0 to host 192.168.99.100 left intact
    Hello meetup members
Docker Pull Command
Owner
mrichman

Comments (0)