Skip to content

jeescu/express-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express REST API starter

Build Status bitHound Dependencies bitHound Dev Dependencies

A REST API boilerplate for NodeJS that uses collections of basic practices: Auth, Security, RESTful resources, API docs, Testing and Logging.

Uses MongoDB as its database and Passport for authentication with (jwt).

Libraries and tools used

Getting Started

Clone this repository and install dependencies

> git clone git@github.com:jeescu/express-rest-api.git
> cd express-rest-api

> npm install

Run development with nodemon

> npm run dev

Build and run for production

> npm run start

Tests

Unit tests:

> npm run test:specs

Black-box end-to-end tests:

npm run test:e2e

Or run both tests:

> npm test

Lint

> npm run lint

Docker support

> cd express-rest-api

# Build your docker
> docker build -t rest-api .

# Run your docker image with the tag name
> docker run -p 8080:8080 rest-api

API documentation

Checkout localhost:8080/docs.

When using Apiary, create new project api using swagger and copy swagger.json content to the editor and publish it. See example.

Licence

MIT