(venv)$ pip install -r requirements.txt
Basically, this installs tornado
and jinja2
.
Then, install npm packages. You should install webpack globally, and other packages locally.
(venv)$ npm install -g webpack
(venv)$ npm install
This basically installs babel-loader
, babel-runtime
, style-loader
, css-loader
, sass-loader
, extract-text-webpack-plugin
, assets-webpack-plugin
.
The main index HTML is located at templates/index.html
.
The main javascript is located at js/main.jsx
.
The main scss is located at scss/main.scss
.
Run webpack
and watch changes by the following command:
(venv)$ webpack --progress --watch
Run the python script:
(venv)$ python server.py
Then, access the webpage at http://localhost:8888/
In order to manage node.js as how virtual environment does in python, I use nvm. Please refer to https://github.com/creationix/nvm