1.0.6 • Published 7 years ago

react-es6-webpack-express-starter v1.0.6

Weekly downloads
2
License
GNU
Repository
github
Last release
7 years ago

Introduction

  • This project is a MERN stack advanced starter project
  • Server Side Rendering implemented with respect to latest specs of React Router 4 and React v0.16
  • Sequelize JS is used as ORM for RDBMS and MongoDb driver is used for access to MongoDB
  • Grunt is used for task runner
  • React-Router 4 is used for routing.
  • ApiDocs JS are integrated. Please refer API DOCS for more details
  • Grunt Version Bump is configured. Run grunt bump --message="You Commit Message Goes Here"
  • Mocha and Chai is used for testing and code coverage is provided by Istanbul

Pre Requisites

Once you have the project template, install all dependencies (bower and node) by executing

$ npm install

and

$ bower install

After all bower and npm packages and installed, install necessary global dependencies like: pm2, npm-run-parallel, mocha, sequelize, apidocs, npm-run-parallel etc. Please add a .env file to the root containing ENV and other variables.

How to Run

    "test": "mocha ./src/server/test/**/*.js --compilers js:babel-core/register --bail --color",
    "start": "npm-run-parallel run watch",
    "run": "grunt",
    "api-doc": "apidoc -i src/ -o apidoc/",
    "watch": "webpack --watch",
    "bump": "grunt bump",
    "coverage": "grunt coverage"

To run this project, use npm start. For a better idea about using grunt-bump for major:minor:patch please execute the command as follows

    grunt bump:major --message="Your major version bump message"
    grunt bump:minor --message="Your minor version bump message"
    grunt bump:patch --message="Your patch version bump message"

When you run npm run coverage command, this will run the test and generate coverage folder in root. Open the folder coverage/lcov-report/index.html to see the coverage report on your browser.

When you run npm run api-doc, this will generate ApiDoc in a folder named apidoc in the root. Open the index.html to see the ApiDoc. Please ensure you follow all the commenting guidlines for ApiDoc to work correctly.

Future Updates

  • AWS SDK boilterplates: for S3, Lambda etc
  • Redis configuration

Known Issues

  • ecosystem folder missing. This folder contains two files: client.js and server.js. Each file contains environment varialbles and other account configuration. Drop a comment and I will share these files.
  • Ensure that you have installed Istanbul globally. Make sure you install istanbul@1.0.0-alpha.2 since other version seems to give the issue No coverage information was collected, exit without writing coverage information
  • Make sure you have installed all the global dependencies. Don't worry 😊 if you don't know, just run npm start, if any global dependencies are missing then our kind command line will prompt you.