Skip to content

bzhou/pyreact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instruction

clone the repo

$ git clone this_pyreact_repo

python virtualenv

$ pip install -U pip    # just make sure pip is up-to-date
$ pip install virtualenv
$ virtualenv pyreact
$ cd pyreact
$ . bin/activate
$ pip install Flask Flask-Webpack Fabric

prep fab

$ ssh-copy-id localhost
$ touch ~/room1 ~/room2

javascript & webpack prep (install node first, on mac, brew install node)

term2 $ cd pyreact
term2 $ echo '{}' > package.json
term2 $ npm install -save webpack \
  react react-dom react-addons-update react-toggle \
  babel-core babel-loader babel-preset-es2015 babel-preset-react \
  style-loader css-loader sass-loader node-sass \
  manifest-revision-webpack-plugin extract-text-webpack-plugin \
  whatwg-fetch \

run webpack

term2 $ ./node_modules/.bin/webpack --watch

run flask (must be in the python virtualenv terminal)

$ DEBUG=1 bin/python run.py

point your browser to http://127.0.0.1:5000/

Reference and Credit

About

Flask, webpack, and react example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published