Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.09 KB

README.md

File metadata and controls

53 lines (40 loc) · 1.09 KB

jblog

My personal blog software.

Development Environment

Dependencies and Database

Install dependencies and setup database:

# dependencies
pipenv install && pipenv install --dev
pipenv shell
npm ci && npm run build

# database
python manage.py --create-database
python manage.py --create-user-account myusername

The shell will prompt for details, when necessary (e.g. user password).
The database will be populated with some dummy data.

Development Server

Now start the local development servers in different shells:

# run dev server, auto refreshes on save
python main.py

# auto recompiles javascript on save
npm run watch

Browse to localhost:5000 to view the page.

Deploying

Dependencies and Database

# dependencies
pipenv install
pipenv shell
npm ci && npm run deploy

# database
python manage.py --create-database
python manage.py --create-user-account myusername
python manage.py --create-deploy-config

Warning: Do not commit the config.cfg to git!

Server

For running the production server, refer to gunicorn documentation.