First, setup a python virtualenv (pip install virtualenv
) with the following command:
virtualenv name_of_project
Then go into the environment and activate it with the following command (for macs, pcs are something else):
source bin/activate
Now clone the repository into your virtualenv:
git clone https://github.com/rnvarma/BaseReactDjangoApp
Now change into the repository folder for the next steps.
Run the following commands while your virtualenv is activated and you are in the top level directory of the repository:
sudo pip install -r requirements.txt
npm install
Create a file in the top-level called 'mac-pc-compatability.js'.
If you are using a mac, paste the following code into the file: module.exports = "."
If you are using a pc, paste the following code into the file: module.exports = "../.."
To launch server you need to launch the webpack server + django server:
Webpack cmd (MAC):
./node_modules/.bin/webpack --config webpack.config.js --watch
Webpack cmd (PC): first change directories into node_modules/.bin/ and run the following
webpack --config ../../webpack-config.js --watch
Django cmd:
python manage.py runserver