Coder Social home page Coder Social logo

docker_build's Introduction

Installation without Docker

  1. Install dependencies: npm install
  2. Run app: npm start
  3. Test app: curl localhost:3000 (Change port by exposing $PORT)

Installation with Docker

  1. Build the docker image: docker build . -t "docker_build_exercise"
  2. Run the image: docker run -e PORT=3000 -p 4000:3000 -d "docker_build_exercise"
  3. Test the app: curl localhost:4000

Installation from DockerHub

Just use pascaldmueller/docker_build_exercise:latest to get the image. E.g. docker run --rm --name order-business-card-service -e PORT=4000 -p 4000:4000 pascaldmueller/docker_build_exercise:latest

Usage

Make a POST request to the /orders/businesscard endpoint. It expects a JSON object with a name and brand property.

E.g. (Adjust PORT if needed)

curl -H "Content-Type: application/json" -d '{"name": "John Doe", "brand": "Feldschlösschen"}' -i http://localhost:4000/orders/businesscard

docker_build's People

Contributors

pascal-mueller avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.