Implement shutdown and reboot via API; add Makefile for deployment
This commit is contained in:
parent
56e7a1d2de
commit
f16f506332
11 changed files with 124 additions and 14 deletions
15
src/main.py
15
src/main.py
|
|
@ -1,12 +1,5 @@
|
|||
from microdot_asyncio import Microdot
|
||||
from lightbar.app import Lightbar
|
||||
|
||||
app = Microdot()
|
||||
|
||||
|
||||
@app.route('/')
|
||||
async def index(request):
|
||||
return 'Meow, world\n'
|
||||
|
||||
|
||||
print('[main] Running Microdot app...')
|
||||
app.run(port=80)
|
||||
print('[main] Starting lightbar HTTP server...')
|
||||
api_server = Lightbar()
|
||||
api_server.run(port=80, debug=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue