Skip to content

ywang-wnlo/python-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flaskr

The basic blog app built in the Flask tutorial.

Install

Create a virtualenv and activate it:

python3 -m venv .venv
.venv/bin/activate

Or on Windows cmd:

python3 -m venv .venv
.venv\Scripts\activate.bat

Install Flaskr:

pip install flask

Run in debug

flask --app flaskr init-db
flask --app flaskr run --debug

Open http://127.0.0.1:5000 in a browser.

Production environment (Docker)

Build the image:

docker build -t python-web .

Initialize the database:

docker run -p [port]:8080 -it --restart unless-stopped --name python-web python-web

After db initialization, ctrl+c to stop the container

Normally, you can run the container with:

docker start python-web

About

基于 Flask 做的自用索引网站

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published