Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kevoj/nodetomic-api-swagger

RESTful API Nodejs designed for horizontal scalability with support for cluster, based on Swagger, Redis, JWT, Passport, Socket.io, Express, MongoDB.
https://github.com/kevoj/nodetomic-api-swagger

api auth auth-swagger authentication cluster mongodb node-api node-restful passport redis rest-api scaling socket-cluster socket-io swagger swagger-api swagger-socket

Last synced: about 1 month ago
JSON representation

RESTful API Nodejs designed for horizontal scalability with support for cluster, based on Swagger, Redis, JWT, Passport, Socket.io, Express, MongoDB.

Awesome Lists containing this project

README

        

# 👉👉👉 NEW REPOSITORY ---> HERE! 👈👈👈





# Nodetomic Api Swagger

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f5084c4bad544b2586e3e973c8e3a336)](https://www.codacy.com/app/kevoj/nodetomic-api-swagger?utm_source=github.com&utm_medium=referral&utm_content=kevoj/nodetomic-api-swagger&utm_campaign=Badge_Grade) [![NPM version](https://badge.fury.io/js/nodetomic-api-swagger.svg)](https://npmjs.org/package/nodetomic-api-swagger) [![Build Status](https://travis-ci.org/kevoj/nodetomic-api-swagger.svg?branch=master)](https://travis-ci.org/kevoj/nodetomic-api-swagger) [![dependencies Status](https://david-dm.org/kevoj/nodetomic-api-swagger/status.svg)](https://david-dm.org/kevoj/nodetomic-api-swagger) [![devDependencies Status](https://david-dm.org/kevoj/nodetomic-api-swagger/dev-status.svg)](https://david-dm.org/kevoj/nodetomic-api-swagger?type=dev) [![Gitter chat](https://img.shields.io/gitter/room/kevoj/scaling-fullstack.svg)](https://gitter.im/scaling-fullstack/Lobby) [![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://raw.githubusercontent.com/kevoj/nodetomic-api-swagger/master/LICENSE) [![Downloads](https://img.shields.io/npm/dt/nodetomic-api-swagger.svg?style=flat-square)](https://npmjs.org/package/nodetomic-api-swagger)

> RESTful API Nodejs designed for horizontal scalability with support for cluster, based on Swagger, Redis, JWT, Passport, Socket.io, Express, MongoDB.

### Technologies




















### Preview

**url:**

[![](https://j.gifs.com/0gw5gX.gif)](https://www.youtube.com/watch?v=drhEQl-4x0w)

### Swagger Api

**url:**

**OpenAPI Spec compatibility:** 2.0, 3.0

### Horizontal scalability

View horizontal scaling representation image with nodetomic-api-swagger HERE!

### Structure

 

/src/
|-- api
| |-- swagger
| |-- controllers
| |-- models
| `-- sockets
|-- assets
|-- auth
| |-- swagger
| |-- controllers
| |-- passports
| `-- services
|-- config
|-- lib
| |-- express
| |-- mongoose
| |-- redis-jwt
| |-- socket.io
| `-- swagger
|-- views
`-- app.js

## Requirements

- [Nodejs](https://nodejs.org) >= **6.x.x** (Recommended last version)
- [MongoDB](https://www.mongodb.com) >= **3.x.x**
- [Redis](https://redis.io) >= **3.x.x** (Recommended last version)

## Installation

**Npm**

```bash
git clone https://github.com/kevoj/nodetomic-api-swagger
cd nodetomic-api-swagger
npm i
```

**Yarn**

```bash
yarn add nodetomic-api-swagger --ignore-engines
```

## Development

### Start

**Command:** `npm start`

**Description:** Start the project in development mode

![Imgur](https://i.imgur.com/qY1mzDZ.png)

**Note:** if you want work with **nodemon** execute the command `npm run modemon`

### Build

**Command:** `npm run build`

**Description:** Compile the project by outputting the dist folder

![Imgur](http://i.imgur.com/yTI3otr.png)

**Note:** Generate folder **`dist`**. So "dist/client" is optional. You can paste the compilation of a client here, for example of Vue, React, Angular...

![Imgur](https://i.imgur.com/bVFqr1f.png)

### Test

**Command:** `npm test`

**Description:** Run Lint and run Build in production mode and execute the authentication methods and basic requests.

![Imgur](http://i.imgur.com/ouKpQg1.png)

### Lint

**Command:** `npm run lint`

**Description:** Run ESLint to verify the entire project code


## Pm2 [Development]

### Dev-Simple

**Command:** `npm run dev-simple`

**Description:** Run Pm2 and compile the project in development mode in a single instance

![Imgur](http://i.imgur.com/cNuBVzK.png)

### Dev-Cluster

**Command:** `npm run dev-cluster`

**Description:** Run Pm2 and compile the project in development mode in multiple instances

![Imgur](http://i.imgur.com/wEU2Uz5.png)

## Pm2 [Production]

### Simple

**Command:** `npm run simple`

**Description:** Run Pm2 and compile the project in production mode in a single instance

![Imgur](http://i.imgur.com/tLA2hu7.png)

### Cluster

**Command:** `npm run cluster`

**Description:** Run Pm2 and compile the project in production mode in multiple instances

![Imgur](http://i.imgur.com/HTWJcUk.png)

## Stop

### Pm2

**Command:** `npm stop`

**Description:** Stops all processes associated with project pm2

### Node

**Command:** `killall node`

**Description:** Destroyed all process for node

## API Docs

You can find the documentation HERE!

## License

MIT © [Leonardo Rico](https://github.com/kevoj/nodetomic-api-swagger/blob/master/LICENSE)