Coder Social home page Coder Social logo

ngendlio / my-nodejs-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1 MB

I am opensourcing my Node.js boilerplate that i have been working over the years.(Medium article soon). It is following some of the best practices in programming with node.

Home Page: https://www.linkedin.com/in/lionel-ngendakuriyo-272a3b36/

JavaScript 40.57% CSS 8.36% HTML 51.07%
nodejs boilerplate-application boilerplate-node

my-nodejs-boilerplate's Introduction

Boilerplate for Node.js

I am open sourcing for the first time a boilerplate for Node.js in the back-end. It have tried to follow the best practices and included all folders required for big projects.

By the way, i am open for relocation and/or remote work.

Required dependecies

  • Install Mongo DB
  • Install Redis DB
  • A .env file at the root of your folder

How to run ?

  npm install
  npm start

How to test ?

I am using jest

npm test

.env File Format

## This is the equivalent of the application.properties in Spring.
## All env variables in this file need to be different when in production.\
NODE_ENV=dev
# The application port
PORT=7009

# Database configuration (Do not use the default configs)
MONGO_URI="mongodb://127.0.0.1:25000/DB_NAME"
MONGO_USER="<enter the user>"
MONGO_PASSWORD="<enter the user>"

#Cryptography: We do not store password in clear but hashed with a secret salt.
# https://en.wikipedia.org/wiki/Salt_(cryptography)
PASSWORD_SALT="<enter the password hash>"

## Session
SESSION_SECRET="<enter the session-secret>"

## Redis Database configuration
REDIS_PORT=6379
REDIS_HOST=127.0.0.1
REDIS_SECRET=chooseTheBestPasswordIfNot150kPasswordGuessesPerSecondWillBeEnoughToBruteForce
REDIS_TTL=86400
REDIS_PREFIX=ClientRedis
REDIS_NAME="<prefix_name of the redis keys>"
REDIS_DATABASE=3

SLACK_WEB_HOOK_URL=https://hooks.slack.com/services/xxxxxxxxxxxx

my-nodejs-boilerplate's People

Contributors

dependabot[bot] avatar ngendlio avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.