- Clone this repository by running
git clone https://gitlab.com/francisudeji/location-marker.git
in your terminal. - Obtain a Google API KEY by visiting the Google Maps Platform. Make sure you check Maps and Places checkboxes before hitting continue.
- Create a Mongodb account here if you don't have one, then create a cluster and obtain a connection string specific to that cluster.
- In the
backend
folder, create a.env
file and paste in this snippet:
MONGODB_URI=YOUR_MONGO_DB_URI
GOOGLE_API_KEY=YOUR_GOOGLE_MAP_API_KEY
- In the
frontend
folder, create a.env.development
file and paste in this snippet:
REACT_APP_GOOGLE_API_KEY=YOUR_GOOGLE_MAP_API_KEY
- Replace all placeholder values with your actual credentials and add all
.env
files to.gitignore
. - Run
yarn
in bothbackend
andfrontend
folders to install dependencies. - To run the Apollo Server,
cd backend
andyarn server
- To run the React Development Server,
cd frontend
andyarn start
. - To access your GraphQL endpoint, visit http://localhost:4000.
- To access your react front end, visit http://localhost:3000.
During my testing, I used a separate MongoDB cluster and I'd recomment you do same.
To run tests, simply run yarn test
in backend folder and frontend folder to run them individually.