Sign inSign up

manabuishii/flask-sample

By manabuishii

•Updated about 9 years ago

Flask sample

Image
0

609

manabuishii/flask-sample repository overview

⁠flask-sample

Flask sample

⁠Install flask

Install Flask (0.12)

⁠Very small sample

Very small sample at official site

⁠Flask 0.12 Document

⁠Run

python flasksample.py

it works well

$ python flasksample.py
 * Running on http://0.0.0.0:15000/ (Press CTRL+C to quit)

⁠docker run

docker run --rm manabuishii/flask-sample:0.3.0

⁠Test

⁠Pattern 1

$ curl http://localhost:15000
Hello World!

⁠Pattern 2

$ curl http://localhost:15000/testaccess
Test Access complete.

⁠Pattern 3 , execute command

This sample execute date command

$ curl http://localhost:15000/datecmd
Wed May 31 08:26:23 UTC 2017

⁠Pattern 4 , Get parameter

$ curl http://localhost:15000/parametertest\?yourparameter\=MYPARAMETER
[MYPARAMETER] World!

⁠Pattern 5 , Create form

TODO

⁠Pattern 6 , File upload

TODO

⁠Publish to Internet

⁠Apache httpd reverse proxy

TODO

Tag summary

Content type

Image

Digest

Size

259.5 MB

Last updated

about 9 years ago

docker pull manabuishii/flask-sample