sudo apt install httpie python3-pip
pip3 install -r requirements.txt
python3 -u app.py
http "http://ip-domain:5000/api/content/ device_id=001 nick_name=test body=thisistext datetime=01-01-21 sender_number=0300 status=1"
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 5
Content-Type: application/json
Date: Wed, 17 Mar 2021 12:59:14 GMT
Server: nginx/1.18.0 (Ubuntu)
"OK"
vim /etc/systemd/system/sms.service
[Unit]
Description=sms
After=network.target
[Service]
User=root
WorkingDirectory=/home/ubuntu/private.service
ExecStart=/usr/bin/python3 /home/ubuntu/private.service/app.py
[Install]
WantedBy=multi-user.target
sudo systemctl enable sms.service
sudo systemctl start sms.service
sudo systemctl status sms.service
Done!