aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-05-25 22:02:12 -0700
committerjackyzha0 <[email protected]>2020-05-25 22:02:12 -0700
commit6090eef4f275e405d597a543a69c3e27f31d4251 (patch)
tree403e10b4ec1ebc78d7e6f16d1f50f299c973e242
parentadd more build commands and added prod backend url (diff)
downloadctrl-v-6090eef4f275e405d597a543a69c3e27f31d4251.tar.xz
ctrl-v-6090eef4f275e405d597a543a69c3e27f31d4251.zip
update makefile and readme
-rw-r--r--Makefile8
-rw-r--r--README.md4
-rw-r--r--frontend/public/index.html19
3 files changed, 26 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 532a735..0da146e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,7 @@ docker-build:
docker build -t jzhao2k19/ctrl-v:latest ./backend
docker-run:
docker run -p 8080:8080 jzhao2k19/ctrl-v:latest
-docker-all:
- docker-build docker-run
+docker-all: docker-build docker-run
gcr:
docker tag jzhao2k19/ctrl-v:latest gcr.io/ctrl-v-278404/backend && docker push gcr.io/ctrl-v-278404/backend
docker-push:
@@ -16,8 +15,9 @@ fe-run:
cd frontend && yarn start
fe-build:
cd frontend && yarn build
-fe-deploy:
- fe-build && cd frontend && firebase deploy
+firebase:
+ cd frontend && firebase deploy
+fe-deploy: fe-build firebase
dev:
make -j 2 run fe-run
deploy:
diff --git a/README.md b/README.md
index 3abd0e6..3bf9578 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,9 @@ Frontend is in React and backend is in Go.
when doing local backend development, make sure you change the backend address to be localhost. You can find this on Line 4 of `frontend/src/helpers/httpHelper.js`
#### Common
-`make all` &mdash; starts React development server on `:3000` and backend on `:8080`
+`make dev` &mdash; starts React development server on `:3000` and backend on `:8080`
+
+`make deploy` &mdash; deploys both frontend and backend
#### Frontend
`make fe-run` &mdash; starts React development server on `:3000`
diff --git a/frontend/public/index.html b/frontend/public/index.html
new file mode 100644
index 0000000..0f98915
--- /dev/null
+++ b/frontend/public/index.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="theme-color" content="#000000" />
+ <meta
+ name="ctrl-v"
+ content="some_description"
+ />
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jackyzha0/[email protected]/src/lite.css">
+ <link href="https://fonts.googleapis.com/css2?family=Lora:wght@400;600&family=Roboto+Mono&display=swap" rel="stylesheet">
+ <title>ctrl-v</title>
+ </head>
+ <body>
+ <noscript>You need to enable JavaScript to run this app.</noscript>
+ <div id="root"></div>
+ </body>
+</html>