Skip to content

GuanYangCLU/Node-With-CI-Redis-Test

Repository files navigation

Node Advanced feature implementation example project

Build Status

Travis Ci Official Site

Tags: - On-live: CI/CD, Unit test, Redis cache server, Rest API, Mongo, Mongoose - Comming Soon: Integration test, puppeteer, Google People(auth) - Maybe: Cypress, Enzyme(if include React)

Features included:

  • Serving HTTP requests
  • Restful API for Enterprise Management web app
  • Persistance over MongoDB & mongoose
  • Seperate environment by prod, dev, and ci
  • Log in and auth via JWT
  • Auth with middleware such as Google People/Sign in
  • Caching over redis
  • Best practice of handling errors
  • Unit test with Mocha
  • Integration test with puppeteer
  • Continious Integration(CI/CD) with travis ci
  • Multi branch work flow via pull requests
  • Eslint Config
  • Webpack Config
  • Babel Config

To run test, in root directory, run:

npm test or mocha --exit

To change to your repo:

git remote remove origin

Then can check by:

git remote -v

Add to your repo:

git remote add origin (Your git repo)

In config/dev.js created by your self, set your config like prod and ci with your mongoURI

To install Redis, in terminal, run:

brew install redis

brew services start redis

To test redis is running, in terminal, run:

redis-cli ping

Update

  • #c5f015 Redis branch Add redis caching feature
  • #1589F0 Archive Verion 0 with just CI and Unit test
  • #f03c15 Caching Logic maybe check under delete scenario

Redis applied in:

/routes/users cleanCache: Create user, Edit user, Delete user

/models/users cache service: getUsers query

About

Node Enhancement Features of CI, tests, and Redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors