Skip to content

Latest commit

 

History

History
70 lines (57 loc) · 1.79 KB

SetupLocal.md

File metadata and controls

70 lines (57 loc) · 1.79 KB

How to run this project on local

Prerequisite

STEP1. Clone this repository

git clone https://github.com/spider-hand/Geoguess-Master.git

STEP2. Get Google Maps API key

See the instruction in the link above.

STEP3. Register your app on Firebase and create Realtime Database

See the instructions in the link above.

STEP4. Set up environment variables

Create files named .env.development.local in this project to put environment variables. The files should look like this. (Replace the values with yours you created at STEP 2 and 3.)

.env.development.local

NODE_ENV=development
BASE_URL=http://localhost:8080/
VITE_API_KEY=YOUR_GOOGLE_MAPS_API_KEY
VITE_FIREBASE_API_KEY=YOUR_FIREBASE_API_KEY
VITE_FIREBASE_AUTH_DOMAIN=YOUR_FIREBASE_AUTH_DOMAIN
VITE_FIREBASE_DATABASE_URL=YOUR_FIREBASE_DATABASE_URL
VITE_FIREBASE_PROJECT_ID=YOUR_FIREBASE_PROJECT_ID
VITE_FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET
VITE_FIREBASE_MESSAGING_SENDER_ID=YOUR_FIREBASE_MESSAGING_SENDER_ID
VITE_FIREBASE_APP_ID=YOUR_FIREBASE_APP_ID
VITE_FIREBASE_MEASUREMENT_ID=YOUR_FIREBASE_MEASUREMENT_ID

.env.production.local

NODE_ENV=production
...

Now you can run this project on local.

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Run your unit tests

npm run test:unit

Run your end-to-end tests

npm run test:e2e

Lints and fixes files

npm run lint