Coder Social home page Coder Social logo

kevoj / nodetomic Goto Github PK

View Code? Open in Web Editor NEW
38.0 3.0 13.0 1.16 MB

Minimalist boilerplate for NODEJS, designed for vertical and horizontal scalability.

Home Page: https://kevoj.github.io/nodetomic

License: MIT License

JavaScript 93.77% CSS 0.81% Handlebars 5.42%
node nodejs server api rest scalability express mongodb redis jwt

nodetomic's Introduction

NODETOMIC

Minimalist boilerplate for nodejs, designed for vertical and horizontal scalability.

Technologies

  • Express
  • Redis 6
  • MongoDB 4
  • Swagger 3
  • Webpack 5
  • Babel 7
  • Socket 4
  • Eslint
  • Prettier
  • Jest

Installation

git clone https://github.com/kevoj/nodetomic
cd nodetomic
yarn

Then, you will need to create a .env file in the root of the project

PROJECT_MODE=development
PROJECT_NAME=example-name
SERVER_HOSTNAME=localhost
SERVER_PORT=8000
SERVER_WEBSOCKET_PORT=8001
SWAGGER_HOSTNAME=localhost
SWAGGER_API_DOCS=true
JWT_SECRET_KEY=shhhh
MONGODB_HOSTNAME=127.0.0.1
MONGODB_PORT=27017
MONGODB_DATABASE=example-dev
MONGODB_USERNAME=
MONGODB_PASSWORD=
REDIS_HOSTNAME=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=

Scripts

start

Start the project in development mode with the .env file that is in the root

yarn start

test

Run the unit tests

yarn test

build

Compile the project

yarn build

Docs

Guide

API docs

image

Scalability

Starting point

nodetomic_1

cluster mode (NO SHARED STATE)

nodetomic_2

Add Redis to shared state

nodetomic_3

Added multiple servers and pm2 load balancing

nodetomic_4

Added database and load balancer

nodetomic_5

Added redis cluster and mongodb sharded clusters

nodetomic_6

Conclusion

nodetomic_7

nodetomic's People

Contributors

kevoj avatar saro928 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.