Input text from a browser. Download file from a browser filled with text input from the browser. Made with python flask
input text
browser ---------------> flask server
(download) <--------------- (write file)
send file(.txt)
- Input text from a web browser
- Write text to a .txt file
- Send files from a python flask server
- Download the text file from a browser (UUID v4 filenames)
- python, pip installed
pip install -r requirements.txt
# run shell script
chmod +x run_server.sh
./run_server.sh
# run commands (alternative)
export FLASK_APP=app.py
export FLASK_ENV=development # optional
flask run --host 0.0.0.0 --port 5000
# run in the background
nohup flask run --host 0.0.0.0 --port 5000 >log.txt 2>&1 &
# in case running in the background
tail -f log.txt
- Run server as above
- http://localhost:5000
- Write text
- Push
send
button - Download a file
- Check written in the downloaded file