Nodetomic-api-swagger

Simple and fast Restful API designed for horizontal scalability including cluster, based on Swagger, Socket.io, Nodejs, Redis + Passport, MongoDB, Express
Horizontal scalability
Preview

Swagger Api
http://localhost:8000/docs
Technologies

Requirements
Installation
git clone https://github.com/kevoj/nodetomic-api-swagger
cd nodetomic-api-swagger
npm i
Features
- Tokens
- JWT merged with REDIS
- Expiration time
- Redis
- Pub/Sub
- Events: Expired, del, etc
- Middleware
- Login validation
- Role validation
- Socket.io
- Support cluster
- Socket Redis
- Authentication
- local
- facebook
- twitter
- google
- github
- bitbucket
- and more...
- Session
- Single or Multiple (One or more devices at the same time)
- Get list of sessions
- Destroy a session
- Node
- Support cluster
- Support Pm2
- Swagger
- Routers by swagger
- Swagger UI
Development
Start
npm start

Build
npm run build

- Generate output folder:
dist

Test
npm test

Lint
npm lint
Preview Production
Run node in a single thread
npm run serve

Preview Production [Pm2]
Simple
Run pm2 in a single thread and run the monitor
npm run dev-simple

Cluster
Run pm2 in multiple threads and run the monitor
npm run dev-cluster

Production
Simple
Run pm2 in a single thread
npm run simple

Cluster
Run pm2 in multiple threads
npm run cluster

Destroy
PM2
destroy pm2 simple and pm2 cluster
npm stop

Node
destroyed all process for node
killall node
License
MIT © Leonardo Rico