Parcourir la source

Updating api url and adding a vague deploy script

Kirk Trombley il y a 5 ans
Parent
commit
21014d1e4a
2 fichiers modifiés avec 18 ajouts et 1 suppressions
  1. 1 1
      client/src/api.js
  2. 17 0
      deploy.sh

+ 1 - 1
client/src/api.js

@@ -1,4 +1,4 @@
-const BASE_URL = "http://localhost:5000/vacation-planner/api"
+const BASE_URL = "https://kirkleon.ddns.net/vacation-planner/api"
 
 export const getHealth = async () => {
   const res = await fetch(BASE_URL + "/");

+ 17 - 0
deploy.sh

@@ -0,0 +1,17 @@
+#!/usr/bin/env sh
+
+pushd client/
+yarn build
+popd
+
+pushd server/
+./gendb.py 5/31 9/5 vacation.db
+popd
+
+tar czvf /tmp/deploy-vp.tgz \
+    server/app.py \
+    server/requirements.txt \
+    server/vacation.db \
+    client/build
+
+scp /tmp/deploy-vp.tgz hiram:/opt/vacation-planner/deploy-vp.tgz