Basic production ready React application configuration.
Configuration based on Razzle and inspired by React Boilerplate
node>=8.10
yarn>=1.7
python
- to install virtualenv- See Dockerfile for other dependencies
We are using python's virtualenv
to create independent project environments.
-
Install python
virtualevnwrapper
. -
Setup virtual environment
mkvirtualenv --python=python3.5 project-name
echo cd ${PWD} >> ~/.virtualenvs/project-name/bin/postactivate
-
Install
nodejs
in your virtualenvpip install nodeenv
Install newest
node
8 version. You can check available version using commandnodeenv --list
nodeenv -p --prebuilt --node=8.11.3
-
Install project dependencies
yarn install
NOTE The boilerplate requires backend server providing graphql API.
yarn start
Run development server at 127.0.0.1:3000
.
You can use environment variable PORT
to use another port
and HOST
to change default host. Another way is to set custom
variables in .env
files (dotenv) - check
Razzle's documentation
to learn more. *.local
files are excluded from git.
yarn test
Runs all tests and returns coverage report.
yarn test:watch
Run tests in jest
watch mode.
npm run lint