Simple and compact boilerplate for ReactJS project with expressJS
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
I wrote an article about this repo which explains the structure.
This is a boilerplate to use ReactJS, ExpressJS, Redux and React Router v4 in a project.
Node Version: v9.0.0^
Just clone this repo or download the zip file.
cdinto the directory and run
To develop your own react application, you can take advantage of React Hot Loader and Webpack Dev Server. To develop app with hot reload:
npm run dev
Now you can access your react application on http://localhost:8080
To make a production build of your project, run the following commands
npm run build
This will create create two files:
server.jswill be used for serving the application on port 3000 and
index.jsis the actual react app itself.
The you will be able to access this app from http://localhost:3000.
To get a distributable tarball of your application, run this command
Remember that you have to run
npm run buildbefore doing this. This will create a tar.gz file in your root folder. The contents in this file is deployable. All you need to do is copy the contents inside package folder inside this tar.gz file to your server and run the app with something like pm2.