https://github.com/nemanjam/bot-framework
https://github.com/nemanjam/bot-framework
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nemanjam/bot-framework
- Owner: nemanjam
- License: mit
- Created: 2022-08-03T10:59:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T19:30:52.000Z (over 3 years ago)
- Last Synced: 2025-03-30T19:48:37.030Z (about 1 year ago)
- Language: Python
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flask bot
### Forked from:
- https://github.com/nuvic/flask_for_startups
### Run migration with
```bash
PYTHONPATH=. alembic -c migrations/alembic.ini -x db=dev upgrade head
```
### Lint and format
- lint: `flake8`, format: `black`
- double definitions:
```ts
// extensions, settings (format, lint)
// .devcontainer/devcontainer.json
// .vscode/extensions.json
// .vscode/settings.json
```
### Start app
```bash
flask run
```
### New how to run in container
```bash
# migrate db
alembic -c migrations/alembic.ini -x db=dev upgrade head
# run flask on port 5000
flask run
```
### Start container
```yaml
# either flask run and bind 5000 on start
command: sh -c 'cd .. && flask run' # this doesn't work
ports:
- '5000:5000'
# or sleep infinity and leave 5000 free, then flask run will ask vs code to forward port
command: sleep infinity # that's it
flask run # in terminal
# can use or not, either is fine
"forwardPorts": [5000],
```