This repo will eventually hold a scavenger hunt app that will utilize the Twilio texting service.
Application: https://digital-scavenger-ui.onrender.com/
Storybook: https://digital-scavenger-storybook.onrender.com
-
Install root dependencies
yarn install
-
Configure pre-commit checks
*This only has to be run once after cloning the repo.
yarn prepare
-
Install client dependencies
yarn install
-
To start the storybook server locally:
yarn storybook
-
To run the app in the development mode:
yarn start
Open http://localhost:3000 to view it in the browser. The page will reload with edits. You will also see any lint errors in the console.
-
To start the test suite:
yarn test
From the terminal in your local project:
-
Make sure the
MONGO_URI
value in your .env file is accurate, then install dependenciesyarn install
-
Go to the
/server/
dir, run this command:yarn dev
After the server is running, do the following from inside Postman:
-
Create a collection. This will allow you to store and use collection variables
-
make sure the below variables are set:
baseURL
-- I have 2 of these I toggle between. One forlocalhost
and one for my deployed server in prodauthToken
-- This will start out as empty
-
Create a new query in the collection
-
In the query input field, simply put
{{baseURL}}
-
On the "Authorization" tab for that query, make the below selections:
- Type:
Bearer Token
- Token:
{{authToken}}
- Type:
-
You must run the
login
mutation first. Copy the token value from the response object. -
Go back to your collection's variables. Paste the copied token value into the field for the
authToken
variable. -
Run any query or mutation as you please!!!
TWILIO_ACCT_SID=< provided by Twilio >
TWILIO_AUTH_TOKEN=< provided by Twilio >
TWILIO_NUMBER=< provided by Twilio >
# FOR LOCAL DEV ONLY - PROD VALUES SET VIA CI PIPELINE
CLIENT_URL=http://localhost:< port >
SERVER_URL_GQL=http://localhost:< port >/graphql
MONGO_URI=< constructed with MongoDB details >
SESSION_SECRET=< randomly button smash a long value >
PORT=< 5 digit number >
JWT_SECRET=< randomly button smash a long value >
ACCESS_TOKEN_SECRET=< randomly button smash a long value >
ACCESS_TOKEN_DURATION=1d
REFRESH_TOKEN_SECRET=< randomly button smash a long value >
REFRESH_TOKEN_DURATION=14d