Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayushsubedi/empty_flask
empty flask to template to any new project
https://github.com/ayushsubedi/empty_flask
Last synced: 9 days ago
JSON representation
empty flask to template to any new project
- Host: GitHub
- URL: https://github.com/ayushsubedi/empty_flask
- Owner: ayushsubedi
- License: mit
- Created: 2021-02-08T02:17:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-19T07:49:39.000Z (over 3 years ago)
- Last Synced: 2024-11-09T12:31:17.692Z (2 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Installation
#### Clone the repository
`https://github.com/ayushsubedi/empty_flask/`
### Rename
Rename empty_flask (folders and imports) to new project name
### Change remote url
`git remote set-url origin https://github.com/USERNAME/REPOSITORY.git`
#### CD into the cloned directory and create a virtualenv
`python -m venv env`
### Enable virtualenv
`.\env\Scripts\activate`
### Enable virtualenv (windows)
`.\env\Scripts\activate`
### Install dependency packages from requirements.txt
`pip install -r requirements.txt`
### Run flask app
`source FLASK_APP="app.py"`
`flask run`### Run flask app (windows)
`$env:FLASK_APP="app.py"`
`flask run`# Running with docker
```
if __name__ == '__main__':
application.run(host= '0.0.0.0', debug=True)
```### Build
```docker build -f Dockerfile -t docker_flask .```### Run
```docker run -p 5000:5000 -ti docker_flask /bin/bash -c "cd /src && source activate ml && python run.py"```