Node.js REST API with Express running on Docker container
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
json
repo
routes
.dockerignore
.eslintignore
.eslintrc
.gitignore
Dockerfile
README.md
app.js
package.json

README.md

sample-nodejs-rest-stub

Code examples for following post:

Install

  • Install Node.js
  • Open cmd.exe and navigate to project's folder.
  • Install project dependencies with following command

npm install

Run

Run project with following command

npm start

Functionalities

There are several functionalities implemented in the stub. See linked posts for more details how to use them.

Persons

Database where you can add, get or remove persons with JSON showing RESTful web services functionality described in blog post. GET endpoints are: http://localhost:3000/person/all, http://localhost:3000/person/get/{id}, http://localhost:3000/person/remove. POST endpoint is: http://localhost:3000/person/save.

Version

http://localhost:3000/api/version returns a configuration value that is read from external config file.