sk-node / app.py
Ron Au
build(app): Fix deploy commands
0c9a6ab
raw
history blame contribute delete
459 Bytes
import os
import subprocess
subprocess.run("echo 'node version:' && node --version", shell=True)
subprocess.run("echo 'npm version:' && npm --version", shell=True)
subprocess.run("pwd && ls -al", shell=True)
subprocess.run("export PORT='7860'", shell=True)
print(f'PORT set to {os.getenv("PORT")}')
subprocess.run("npm --prefix app install", shell=True)
subprocess.run("npm run build --prefix app", shell=True)
subprocess.run("node app/build", shell=True)