Ron Au commited on
Commit
0c9a6ab
1 Parent(s): a418ec5

build(app): Fix deploy commands

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,10 +1,12 @@
 
1
  import subprocess
2
 
3
  subprocess.run("echo 'node version:' && node --version", shell=True)
4
  subprocess.run("echo 'npm version:' && npm --version", shell=True)
5
  subprocess.run("pwd && ls -al", shell=True)
6
- subprocess.run("export PORT=7860", shell=True)
7
- subprocess.run(["echo", '"PORT set to \$PORT"'])
 
8
 
9
  subprocess.run("npm --prefix app install", shell=True)
10
  subprocess.run("npm run build --prefix app", shell=True)
 
1
+ import os
2
  import subprocess
3
 
4
  subprocess.run("echo 'node version:' && node --version", shell=True)
5
  subprocess.run("echo 'npm version:' && npm --version", shell=True)
6
  subprocess.run("pwd && ls -al", shell=True)
7
+
8
+ subprocess.run("export PORT='7860'", shell=True)
9
+ print(f'PORT set to {os.getenv("PORT")}')
10
 
11
  subprocess.run("npm --prefix app install", shell=True)
12
  subprocess.run("npm run build --prefix app", shell=True)