Sign inSign up

akorn/sample-blog-api

By akorn

•Updated almost 7 years ago

A simple blog API written using wheezy.web framework.

Image
0

583

akorn/sample-blog-api repository overview

⁠Sample Blog API

Build Status Code Climate

A simple blog API written using python⁠ and wheezy.web⁠ framework.

⁠Setup

Virtual environment:

virtualenv -p python2.7 env
source env/bin/activate

on Windows:

virtualenv.exe env
env\Scripts\activate.bat

install dependencies:

pip install -e .

install development dependencies:

pip install -r requirements.txt

⁠Prepare

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

⁠Run

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.

Tag summary

Content type

Image

Digest

Size

26 MB

Last updated

almost 7 years ago

docker pull akorn/sample-blog-api:python2-alpine