- ES6 support via babel
- REST resources as middleware via resource-router-middleware
- CORS support via cors
- Body Parsing via body-parser
Tip: If you are using Mongoose, you can automatically expose your Models as REST resources using restful-mongoose.
# Build your docker
docker build -t es6/api-service .
# ^ ^ ^
# tag tag name Dockerfile location
# run your docker
docker run -p 8080:8080 es6/api-service
# ^ ^
# bind the port container tag
# to your host
# machine port
Before using the service you must run the following commands in your terminal
Yarn
$ yarn install
NPM
$ npm install
To run project locally with hot reloading whenever code is changed inside the project use the following commands.
Yarn
$ PORT=8080 yarn dev # Set port manually
$ yarn dev # Automatically sets port to 8080
NPM
$ PORT=8080 npm dev # Set port manually
$ npm dev # Automatically sets port to 8080
If you have a now.sh account setup. Running the following command will deploy an instance of this service to your account.
Yarn
$ yarn deploy
NPM
$ npm deploy
It's supposed to be pretty easy to take your Docker to your favourite cloud service, here's a demo of what's our Dockerized bolierplate is like: Ride endpoint
MIT