## Install & run
Frontend:
npm i && npm run start
API Server:
cd backend && npm i && npm run start
Go to http://localhost:3000/
.
npm run build
This will create a dist/
folder with a app.min.js
which will be used on any environment which isn't undefined (i.e. not local).
npm run start-prod
This will build and then run your app with environment set to production, so that app.min.js
and config/production.js
are used.
Add your routes in Routes.js
.
<Route path='users' component={Users} />
The parent App.js
defines the base title and meta in a Helmet
component. Any sub-component can override/add properties (even adding scripts and css). See the react-helmet docs for more info.
You can store app settings under app/config/
. A file matching process.env.NODE_ENV
will be loaded, for example app/config/production.js
. If process.env.NODE_ENV
is undefined it will fallback to app/config/default.js
. You can access the correct config with:
import config from './config';