Feeling overwhelmed by other complex boilerplates and desiring to understand how things work, I combined various implementations and created a personal boilerplate for a Universal React application based on the MERN ( MongoDB, Express, React, Node ) stack. The project also integrates Redux, Redux-Saga and JWT (Json Web Token ) authentication and has hot-reload functionality.
- Node.js
- MongoDB
- Run
npm install
- Edit the
config.js
file found insrc/server/
by adding your own secret and database connection strings like this:
module.exports = {
'secret' : 'mysecret',
'database' : 'mongodb://localhost/myConnection'
};
- Start mongodb server
- Run
npm start
- Open a browser and navigate to
http://localhost:3000/api/setup
- Navigate to
http://localhost:3000/
. You can log in usingmyuser
andpassword
- Chris Sevilleja - scotch.io
- yusinto - universal-hot-reload