This repo is based on a Next.js starter, but it really just contains a single function in pages/API
to get Air Quality readings from Purple Air, store it in Sanity.io and send it out over Twilio on SMS.
You will need to provision it with the following .env vars:
- SANITY_TOKEN
- SANITY_PROJECT_ID
- TWILIO_AUTH_TOKEN
- TWILIO_NUMBER
- TWILIO_ACCOUNT_SID
To run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000/api/main to run the function.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.