A simple blog API written using python and wheezy.web framework.
Virtual environment:
py -mvenv env
. env/bin/activate
install dependencies:
pip install -e .
install development dependencies:
pip install -r requirements/dev.txt
The static content in sample-blog-react need to be build with web api strategy:
cd ../sample-blog-react
API=web npm run build
and linked to content/static
directory:
cd ../sample-blog-api
ln -s ../../sample-blog-react/dist content/static
Serve files with paster (pip install pastescript
) web server:
paster serve --reload etc/development.ini
or uwsgi:
uwsgi --ini etc/development.ini
or gunicorn:
gunicorn -b 0.0.0.0:8080 -w 1 app:main
Open your browser at http://localhost:8080, use demo / password.