/location-marker

Easily geolocate locations to google maps

Primary LanguageCSS

Location Marker

How to run

  1. Clone this repository by running git clone https://gitlab.com/francisudeji/location-marker.git in your terminal.
  2. Obtain a Google API KEY by visiting the Google Maps Platform. Make sure you check Maps and Places checkboxes before hitting continue.
  3. Create a Mongodb account here if you don't have one, then create a cluster and obtain a connection string specific to that cluster.
  4. 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
  1. In the frontend folder, create a .env.development file and paste in this snippet:
REACT_APP_GOOGLE_API_KEY=YOUR_GOOGLE_MAP_API_KEY
  1. Replace all placeholder values with your actual credentials and add all .env files to .gitignore.
  2. Run yarn in both backend and frontend folders to install dependencies.
  3. To run the Apollo Server, cd backend and yarn server
  4. To run the React Development Server, cd frontend and yarn start.
  5. To access your GraphQL endpoint, visit http://localhost:4000.
  6. To access your react front end, visit http://localhost:3000.

Testing

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.