Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 1.09 KB

README.md

File metadata and controls

28 lines (16 loc) · 1.09 KB

Frontend

The frontend is a VanillaJS app using Vite. Follow Vite's installation guide to get started.

Local set-up

Make sure you have node.js and npm installed.

  1. cd pluto-hist from root and npm install

  2. Create a .env file with the following:

VITE_API_URL=http://127.0.0.1:8000
VITE_KIOSK=false

If you wish the run the frontend in kiosk mode, set VITE_KIOSK=true.

  1. npm run dev and navigate to the localhost URL shown in the terminal!

Deployment

The Parcel ATM frontend is hosted on Vercel. Follow their deployment instructions.

Make sure the set the VITE_API_URL environment in Vercel to your hosted API URL. If you're getting CORS errors, double-check that you added your frontend URL to the backend's allowable origins in main.py.

You might also get CORS errors fetching the pmtiles. I hosted mine on S3, making sure to set the appropriate CORS headers for the bucket. Follow the protomaps instructions to set-up your own pmtiles in cloud storage.