https://github.com/nienzu/api-server-example
嘗試以 python 實作小型 backend-api-server
https://github.com/nienzu/api-server-example
backend flask mysql python
Last synced: about 2 months ago
JSON representation
嘗試以 python 實作小型 backend-api-server
- Host: GitHub
- URL: https://github.com/nienzu/api-server-example
- Owner: Nienzu
- License: mit
- Created: 2018-06-19T08:55:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-21T15:07:41.000Z (about 8 years ago)
- Last Synced: 2025-07-31T17:51:43.475Z (11 months ago)
- Topics: backend, flask, mysql, python
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# api-server-example
嘗試以 python 實作小型 backend-api-server
# Setup
### 建議使用 virtualenv 來當作 python 的開發環境
```
virtualenv -p python3 .py3
source .py3/bin/activate
```
then
```
pip install -r requirements.txt
```
# Production
```
gunicorn -c gunicorn.conf.py -w 4 -b 0.0.0.0:8000 -k gevent app:app --reload
```
# Development
```
export FLASK_APP=my_application
export FLASK_ENV=development
flask run
```