diff --git a/README.md b/README.md index e760b06..2ff20da 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Crabfit +# Crabfit avatar Align your schedules to find the perfect time that works for everyone. @@ -8,3 +8,13 @@ Align your schedules to find the perfect time that works for everyone. 2. Run `yarn` in both folders. 3. Run `node index.js` in the backend folder to start the API. 4. Run `yarn start` in the frontend folder to start the front end. + +## Deploy + +### Frontend +1. In the frontend folder `cd crabfit-frontend` +2. Run `./deploy.sh` to compile and deploy. + +### Backend +1. Deploy the backend `cd crabfit-backend && gcloud app deploy --project=crabfit` +2. Deploy the endpoints service `cd crabfit-backend && gcloud endpoints services deploy swagger.yaml` diff --git a/crabfit-backend/index.js b/crabfit-backend/index.js index e53d03b..9100ca9 100644 --- a/crabfit-backend/index.js +++ b/crabfit-backend/index.js @@ -22,7 +22,7 @@ const datastore = new Datastore({ }); app.use(cors({ - origin: 'http://localhost:3000', + origin: process.env.NODE_ENV === 'production' ? 'https://crab.fit' : 'http://localhost:3000', })); app.use(express.json()); app.use((req, res, next) => { diff --git a/crabfit-frontend/public/index.html b/crabfit-frontend/public/index.html index 11686e0..3b7827a 100644 --- a/crabfit-frontend/public/index.html +++ b/crabfit-frontend/public/index.html @@ -1,23 +1,31 @@ - - - - + + + + + - - + content="Enter your availability to find a time that works for everyone!" + > + + - + + + + + Crab Fit - +