Example DBBasic apps (an API, a blog and a microblog) and a template for new DBBasic modules.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-examples.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-examples.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-examples.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add official module template for creating DBBasic packages 17cf88a 1 year, 1 month ago History
manage.py · 485 bytes · 19 lines
1#!/usr/bin/env python3
2import sys
3import os
4import uvicorn
5
6if __name__ == '__main__':
7 # Run uvicorn directly with dbbasic-web's ASGI app
8 # The settings module will detect the api/ directory and use it
9 host = os.getenv("HOST", "0.0.0.0")
10 port = int(os.getenv("PORT", "8000"))
11
12 print(f"Starting blog on http://{host}:{port}")
13 uvicorn.run(
14 "dbbasic_web.asgi:app",
15 host=host,
16 port=port,
17 reload=True,
18 log_level="info",
19 )