- Endpoint
/
- request : None
- response: String
"Hello world"
- Endpoint
/echo/[somedata]
- request : Any String
- response: application/json
{ "echo": "somedata" }
- Endpoint
/api/numtoword/[number]
- request : Any integer
- response: application/json
{ "en_word": "english number word", "th_word": "thai number word" }
pip install -r requirements.txt
python server/server.py
# macOS/Linux
# You may need to run sudo apt-get install python3-venv first
python3 -m venv .venv
# Windows
# You can also use py -3 -m venv .venv
python -m venv .venv
echo PYTHONPATH=server >> .env
docker build -t flask-sample:[tag-name] -f Dockerfile .
docker build --build-arg http_proxy=http://host:port --build-arg https_proxy=http://host:port -t flask-sample:[tag-name] .
docker run -d -p XXXX:8080 flask-sample:[tag-name]
โ This project use python 3.7.X 32-bit to run server