Site to allow people to exchange their reservations
- Clone the repo:
git clone https://github.com/your-org/bcferries-exchange.git cd bcferries-exchange - Install dependencies:
npm install
- Copy and edit your environment variables:
Fill in:
cp .env.local.example .env.local
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_STORAGE_BUCKETNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDNEXT_PUBLIC_FIREBASE_APP_IDSENDGRID_API_KEYFROM_EMAIL
- Run locally:
npm run dev
- Navigate and install:
cd functions npm install - Set Function config:
firebase functions:config:set \ sendgrid.key="$SENDGRID_API_KEY" \ sendgrid.from="$FROM_EMAIL"
- Deploy Functions only:
firebase deploy --only functions
- Push to GitHub and import into Vercel.
- In Vercel project settings, add these Environment Variables under "Production":
NEXT_PUBLIC_FIREBASE_API_KEY,NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN, etc.SENDGRID_API_KEY,FROM_EMAIL
- Deploy. Vercel will automatically run
npm run build.