All Projects β†’ Shyam-Chen β†’ Express Starter

Shyam-Chen / Express Starter

Licence: mit
🚚 A boilerplate for Node.js, Express, Mongoose, Heroku, Atlas, Nodemon, PM2, and Babel. REST / GraphQL API Server | PaaS | SaaS | CI/CD | Jest | Supertest | Docker | MongoDB | PostgreSQL | Sequelize | Lodash | RxJS | JWT | Passport | WebSocket | Redis | CircleCI | Apollo | DevSecOps | Microservices | Backend Starter Kit | ES6

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Express Starter

Simple Universal React Redux
The simplest possible Async Universal React & Redux Boilerplate app, that works on both Mac and Windows
Stars: ✭ 58 (-83.57%)
Mutual labels:  babel, express, nodemon
Express Mongoose Es6 Rest Api
πŸ’₯ A boilerplate application for building RESTful APIs Microservice in Node.js using express and mongoose in ES6 with code coverage and JsonWebToken Authentication
Stars: ✭ 2,811 (+696.32%)
Mutual labels:  babel, mongoose, express
Wxapp
πŸ™‹travelib-node ζ΅εŠ¨ε›ΎδΉ¦Node.js后端
Stars: ✭ 132 (-62.61%)
Mutual labels:  mongoose, express, pm2
Js Stack From Scratch
πŸ› οΈβš‘ Step-by-step tutorial to build a modern JavaScript stack.
Stars: ✭ 18,814 (+5229.75%)
Mutual labels:  heroku, nodemon, pm2
Cmms
Computerized Maintenance Management System
Stars: ✭ 31 (-91.22%)
Mutual labels:  heroku, mongoose, express
Reactly Starter Kit
Deployable React + Webpack 2 starter kit
Stars: ✭ 122 (-65.44%)
Mutual labels:  heroku, babel, express
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (-58.92%)
Mutual labels:  babel, express, pm2
Node Express Mongoose Demo
A simple demo app using node and mongodb for beginners
Stars: ✭ 4,976 (+1309.63%)
Mutual labels:  heroku, mongoose, express
Express Babel
Express starter kit with ES2017+ support, testing, linting, and code coverage
Stars: ✭ 621 (+75.92%)
Mutual labels:  heroku, babel, express
Ecommerce Nodejs
Ecommerce application back-end codes
Stars: ✭ 97 (-72.52%)
Mutual labels:  heroku, mongoose, express
Express Webpack React Redux Typescript Boilerplate
πŸŽ‰ A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-55.81%)
Mutual labels:  heroku, babel, express
ahobsu-node-backend
🌈 MOTI ! Make Own True Identity ⭐️ μœ λ‹ˆνμ™€ μœ μ΄ˆμ½”νŒŒμ΄ λ…Έλ“œλ‘œ νƒˆμ£Όν•˜λ‹€πŸ˜Ž
Stars: ✭ 16 (-95.47%)
Mutual labels:  nodemon, pm2
react-full-stack-starter
🎈Full-stack React boilerplate using `create-react-app`, Babel, Node.js, and express
Stars: ✭ 22 (-93.77%)
Mutual labels:  babel, mongoose
haversine-rest-api
This Api compares results returned by β€˜Haversine’ formula and MongoDB Geospatial Indexes.
Stars: ✭ 16 (-95.47%)
Mutual labels:  mongoose, nodemon
Bulletproof Nodejs
Implementation of a bulletproof node.js API πŸ›‘οΈ
Stars: ✭ 4,369 (+1137.68%)
Mutual labels:  mongoose, express
summary1
δΈͺδΊΊζ€»η»“ ζŒη»­ζ›΄ζ–° ζ¬’θΏŽζε‡Ίε„η§issues
Stars: ✭ 13 (-96.32%)
Mutual labels:  mongoose, pm2
twitch-chat-visualizer
A Node.js Project. Would you like to see your chat stream with a custom design? This is for you!
Stars: ✭ 14 (-96.03%)
Mutual labels:  heroku, nodemon
Woo Next
πŸš€ React WooCommerce theme, built with Next JS, Webpack, Babel, Node, Express, using GraphQL and Apollo Client
Stars: ✭ 342 (-3.12%)
Mutual labels:  babel, express
Twreporter React
twreporter site with nodejs
Stars: ✭ 263 (-25.5%)
Mutual labels:  babel, express
The Example App.nodejs
Example app for Contentful in node.js
Stars: ✭ 279 (-20.96%)
Mutual labels:  heroku, express

Express Starter

🚚 A boilerplate for Node.js, Express, Mongoose, Heroku, Atlas, Nodemon, PM2, and Babel.

Build Status Coverage Status // Dependency Status devDependency Status

🌈 Live Demo

This seed repository provides the following features:

  • ---------- Essentials ----------
  • [x] Web application framework with Express.
  • [x] Object-document mapping with Mongoose.
  • [x] Make authenticated requests with Passport.
  • [x] File upload with Multer.
  • [x] Real-time communication with WS.
  • ---------- Tools ----------
  • [x] Next generation JavaScript with Babel.
  • [x] JavaScript static code analyzer with ESLint.
  • [x] Code formatter with Prettier.
  • [x] Unit testing with Jest.
  • [x] End-to-End testing with Supertest.
  • [x] Mocking external requests with Nock.
  • [x] Automatically restart application with Nodemon.
  • [x] Keeping application alive with PM2.
  • [x] Reverse proxy with Caddy.
  • ---------- Environments ----------
  • [x] Cloud application hosting with Heroku.
  • [x] Cloud NoSQL database hosting with Atlas.
  • [x] Cloud storageβ€Ž hosting with Cloudinary.
  • [x] Error tracking service with Sentry.
  • [x] Software container with Docker.
  • [x] Continuous integration with CircleCI.
  • [x] Fix and prevent known vulnerabilities with Snyk.
  • [x] Test coverage integration with Codecov.

Table of Contents

Getting Started

Follow steps to execute this boilerplate.

  1. Clone this boilerplate
$ git clone --depth 1 https://github.com/Shyam-Chen/Express-Starter.git <PROJECT_NAME>
$ cd <PROJECT_NAME>
  1. Install dependencies
$ npm install
  1. Start a development server
$ yarn serve
  1. Produce a production-ready bundle
$ yarn build
  1. Lint and fix files
$ yarn lint
  1. Run unit tests
$ yarn unit
  1. Run end-to-end tests
$ yarn e2e
  • MongoDB
$ brew tap mongodb/brew
$ brew install mongodb-community
$ mongo --version
# MongoDB shell version v4.4.1
# Build Info: {
#     "version": "4.4.1",
#     "gitVersion": "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1",
#     "modules": [],
#     "allocator": "system",
#     "environment": {
#         "distarch": "x86_64",
#         "target_arch": "x86_64"
#     }
# }

# Starting MongoDB
$ brew services run mongodb-community
$ brew services list

# Stopping MongoDB
$ brew services stop mongodb-community

Dockerization

Dockerize an application.

  1. Build and run the container in the background
$ docker-compose up -d app
  1. Run a command in a running container
$ docker-compose exec app <COMMAND>
  1. Remove the old container before creating the new one
$ docker-compose rm -fs
  1. Restart up the container in the background
$ docker-compose up -d --build app

Local Databases

$ docker-compose up -d mongodb

Configuration

Control the environment.

Default environments

Set your local environment variables.

// src/env.js

export const NODE_ENV = process.env.NODE_ENV || 'development';
export const INDEX_NAME = process.env.INDEX_NAME || 'local';

export const HOST = process.env.HOST || '0.0.0.0';
export const PORT = process.env.PORT || 3000;

export const SECRET_KEY = process.env.SECRET_KEY || 'jbmpHPLoaV8N0nEpuLxlpT95FYakMPiu';

export const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://127.0.0.1:27017/test';
export const REDIS_URL = process.env.REDIS_URL || 'redis://127.0.0.1:6379/4';

// ---

export const CLOUDINARY_URL = process.env.CLOUDINARY_URL || 'cloudinary://key:[email protected]_name';

export const RATE_LIMIT = process.env.RATE_LIMIT || 0;

export const SENTRY_DSN = process.env.SENTRY_DSN || null;

Continuous integration environments

Add environment variables to the CircleCI build.

# Project Settings > Environment Variables > Add Environment Variable

SECRET_KEY
MONGODB_URI
SENTRY_DSN

Examples

Directory Structure

The structure follows the LIFT Guidelines.

.
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ core
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ <FEATURE> -> feature modules
β”‚   β”‚   β”œβ”€β”€ __tests__
β”‚   β”‚   β”‚   β”œβ”€β”€ controller.spec.js
β”‚   β”‚   β”‚   β”œβ”€β”€ service.spec.js
β”‚   β”‚   β”‚   β”œβ”€β”€ model.spec.js
β”‚   β”‚   β”‚   └── rest|<FLOW>.e2e-spec.js
β”‚   β”‚   β”œβ”€β”€ controller.js
β”‚   β”‚   β”œβ”€β”€ service.js
β”‚   β”‚   β”œβ”€β”€ model.js
β”‚   β”‚   └── index.js
β”‚   β”œβ”€β”€ <GROUP> -> module group
β”‚   β”‚   └── <FEATURE> -> feature modules
β”‚   β”‚       β”œβ”€β”€ __tests__
β”‚   β”‚       β”‚   β”œβ”€β”€ controller.spec.js
β”‚   β”‚       β”‚   β”œβ”€β”€ service.spec.js
β”‚   β”‚       β”‚   β”œβ”€β”€ model.spec.js
β”‚   β”‚       β”‚   └── rest|<FLOW>.e2e-spec.js
β”‚   β”‚       β”œβ”€β”€ controller.js
β”‚   β”‚       β”œβ”€β”€ service.js
β”‚   β”‚       β”œβ”€β”€ model.js
β”‚   β”‚       └── index.js
β”‚   β”œβ”€β”€ app.js
β”‚   β”œβ”€β”€ env.js
β”‚   └── server.js
β”œβ”€β”€ .editorconfig
β”œβ”€β”€ .eslintrc
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .prettierrc
β”œβ”€β”€ babel.config
β”œβ”€β”€ Caddyfile
β”œβ”€β”€ circle.yml
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ jest.config.js
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ processes.js
└── README.md

Microservices

Microservice architecture – a variant of the service-oriented architecture structural style – arranges an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight.

See Server-side Micro-Fullstack for instructions on how to create microservices from source code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].