Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

bytesleo/nodetomic

Repository files navigation

Minimalist boilerplate fornodejs, 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/nodetomiccd nodetomicyarn

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

PROJECT_MODE=developmentPROJECT_NAME=example-nameSERVER_HOSTNAME=localhostSERVER_PORT=8000SERVER_WEBSOCKET_PORT=8001SWAGGER_HOSTNAME=localhostSWAGGER_API_DOCS=trueJWT_SECRET_KEY=shhhhMONGODB_HOSTNAME=127.0.0.1MONGODB_PORT=27017MONGODB_DATABASE=example-devMONGODB_USERNAME=MONGODB_PASSWORD=REDIS_HOSTNAME=127.0.0.1REDIS_PORT=6379REDIS_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

yarntest

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


[8]ページ先頭

©2009-2025 Movatter.jp