mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
serve frontend
This commit is contained in:
15
build.py
Normal file
15
build.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import subprocess
|
||||
import os
|
||||
import shutil
|
||||
|
||||
if os.path.exists("build"):
|
||||
shutil.rmtree("build")
|
||||
os.mkdir("build")
|
||||
|
||||
subprocess.run(["go", "build", "-o", "build/", "main.go"])
|
||||
|
||||
os.chdir("./frontend")
|
||||
subprocess.run(["npm", "install"], shell=True)
|
||||
subprocess.run(["npm", "run", "build"], shell=True)
|
||||
os.chdir("..")
|
||||
shutil.copytree("./frontend/dist", "./build/static")
|
Reference in New Issue
Block a user