浏览代码

Updating api url and adding a vague deploy script

Kirk Trombley 5 年之前
父节点
当前提交
21014d1e4a
共有 2 个文件被更改,包括 18 次插入1 次删除
  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