install python dependencies
flask
flask-cors
app/__init__.py
basic flask thing
from flask_cors import CORS
from flask import Flask
app = Flask(__name__)
CORS(app)
from app import views
service.py
wrapper file
from app import app
app.run()
use this nssm tool
nssm install "_pytest" "C:\path\to\python.exe" "C:\path\to\service.py"
nssm start "_pytest"
do app.run(port=myport)
in service.py
for custom port