diff --git a/packages/bridge-ui/src/app/components/season-standings/season-standings.component.ts b/packages/bridge-ui/src/app/components/season-standings/season-standings.component.ts index 8a1d691..d510453 100644 --- a/packages/bridge-ui/src/app/components/season-standings/season-standings.component.ts +++ b/packages/bridge-ui/src/app/components/season-standings/season-standings.component.ts @@ -55,7 +55,7 @@ export class SeasonStandingsComponent { return; } - this.sortedStandings = [...this.season.standings] + this.onUpdatedStandings(this.season.standings); console.log("Season Standings - Begin") console.log(this.season); console.log(this.sortedStandings); diff --git a/reboot_and_update.py b/reboot_and_update.py new file mode 100644 index 0000000..396a720 --- /dev/null +++ b/reboot_and_update.py @@ -0,0 +1,32 @@ +import subprocess + +bridge_server = './packages/bridge-server' +bridge_ui = './packages/bridge-ui' + +# Step 1: Shut down the NestJS server +try: + subprocess.run(['npm', 'stop'], cwd=bridge_server, check=True, shell=True) +except: + print("") + +# Step 2: Shut down the Angular frontend +try: + subprocess.run(['npm', 'stop'], cwd=bridge_ui, check=True, shell=True) +except: + print("") + +# Step 3: Run 'git pull' on the monorepo +subprocess.run(['git', 'pull'], cwd='./', check=True, shell=True) + +# Step 4: Run 'npm install' in both projects +subprocess.run(['npm', 'install'], cwd=bridge_server, check=True, shell=True) +subprocess.run(['npm', 'install'], cwd=bridge_ui, check=True, shell=True) + +# Step 5: Run 'npx sequelize-cli db:migrate' in the NestJS project +subprocess.run(['npx', 'sequelize-cli', 'db:migrate'], cwd=bridge_server, check=True, shell=True) + +# Step 6: Start the NestJS server +server_process = subprocess.Popen(['npm', 'run', 'start', 'nestjs-app'], cwd=bridge_server, shell=True) + +# Step 7: Start the Angular frontend +ui_process = subprocess.Popen(['ng', 'serve', '--host', '0.0.0.0'], cwd=bridge_ui, shell=True) \ No newline at end of file