A Next.js application that loads data remotely from Google Sheets data into Material Table. Uses the serverless function features of ZEIT Now to authenticate users for protected routes via Next.js SDK for signing in with Auth0.
Follow Auth0 configuration setup for here.
Create .env and .env.build files with the following values
# Obtain from Google Sheets API
GS_CLIENT_ID=
GS_API_KEY=
GS_DISCOVERY_DOCS=https://sheets.googleapis.com/$discovery/rest?version=v4
GS_SCOPES_READ_ONLY=https://www.googleapis.com/auth/spreadsheets.readonly
GS_SCOPES_WRITE=https://www.googleapis.com/auth/spreadsheets
# Add your own
GS_SPREADSHEET_ID=
GS_SHEET_ID=
# Obtain from Auth0 Config
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
SESSION_COOKIE_SECRET=YOUR_SUPER_DUPER_SECRET
APP_URL=http://localhost:3000
npm run dev
# or
yarn dev
# or
now dev
Add environment variables according to now.json
now secrets add secret_variable_name secret_value
The easiest way to deploy your Next.js app is to use the ZEIT Now Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.