View it live here: https://adriancuadrado.github.io/google-maps-react-example/
The easiest way to run this project is using the published docker image:
docker run \
--interactive \
--tty \
--rm \
-p 3000:3000 \
--name google-maps \
--env REACT_APP_GOOGLE_MAPS_API_KEY=<YOUR_API_KEY> \
adriancuadrado/google-maps-react-example
Don't forget to replace
<YOUR_API_KEY>
with the correct value
The
--interactive
and--tty
options are there to allow killing the process with Ctrl+C
Then you can open this link with your web browser: http://localhost:3000/
If you want to run this project for development, then follow these steps:
- Install the dependencies locally:
npm install
- Copy the .env file to another called .env.local and edit the environment as you see fit.
- Run the server:
npm start
Once the server is running, you can view the result in this link: http://localhost:3000/
- Make sure you have installed the Firefox web browser.
- Download the Firefox browser driver downloading and extracting the last release of geckodriver for your platform.
- Follow these instructions to add the extracted executable to your PATH.
- Copy the .env.test file to another called .env.test.local and edit the environment as you see fit.
- Execute this command:
npm test -- --watchAll=false
Just run this command:
npm run build