New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodetomic-api-swagger

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodetomic-api-swagger

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

  • 2.7.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Nodetomic-api-swagger NPM version Build Status dependencies Status devDependencies Status Gitter chat GitHub license Downloads

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

Examples

http://localhost:8000/docs

Example horizontal scalability
Technologies

Requirements

  • Nodejs >= 6.x.x (Recommended 8.x.x)
  • MongoDB >= 3.x.x
  • Redis >= 3.x.x (Recommended 4.x.x)

Installation

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

Features

  • Tokens

    • JWT merged with REDIS
  • Redis

    • Pub/Sub Expired, del, etc by key
  • Middleware

    • Login validation
    • Role validation
  • Socket.io

    • cluster
  • Authentication

    • local
    • facebook
    • twitter
    • google
    • github
    • bitbucket
  • Session

    • Single or Multiple (One or more devices at the same time)
    • Get list of sessions
    • Destroy a session
  • Scalability

    • Support for simple execution
    • Support for cluster

Structure

  • client
  • src
    • api
      • controllers
      • models
      • sockets
      • swagger
    • assets
    • auth
      • controllers
      • passports
      • swagger
      • services
    • config
    • core
    • lib
    • seeds
    • views
    • app.js

Development

Start

npm start

Build

npm run build

  • Generate output folder: dist

    • dist
      • client
      • server
      • cluster.config.js
      • simple.config.js
      • package.json
        • npm start
        • npm run simple
        • npm run cluster

Test

npm test

Lint

npm lint

Node [Production]

Default

Description: Run node in a single thread

npm run serve

PM2 [Development]

Simple

Description: Run pm2 in a single thread and run the monitor

npm run dev-simple

Cluster

Description: Run pm2 in multiple threads and run the monitor

npm run dev-cluster

PM2 [Production]

Simple

Description: Run pm2 in a single thread

npm run simple

Cluster

Description: Run pm2 in multiple threads

npm run cluster

Destroy

PM2

Description: destroyed pm2 simple and pm2 cluster

npm stop

Node

Description: destroyed all process for node

killall node

License

MIT © Leonardo Rico

Keywords

FAQs

Package last updated on 30 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc