This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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.
Login to the firebase
firebase login
To test the functions in local environment, first set up env variables in .secrets.local and then run the following commands:
cd functions && npm run serve
or
cd functions && npm run build && firebase emulators:start --only functions
Note: Make sure to restart the emulators every time the code changes.
To deploy functions to production environment:
firebase deploy --only functions
Note: This command deletes the unused functions(those that do not exist in your local source code) from production. Since we are using the common firebase account for both Story Sizer and this project, make sure not to delete any functions of the other project.
To deploy a single function to production environment:
firebase deploy --only functions:functionName
To change the secrets in production:
firebase functions:secrets:set SECRET_NAME
- Login to contentful
- Add an entry for content under 'Job' content type
- Once the changes are done, click 'publish'
- After publishing the content, deploy the app
- Login to contentful
- Open the content you want to unpublish
- Click 'unpublish' from the dropdown under general tab
- After unpublishing the content, deploy the app
We have two preview URLs during PR creation:
- Cloudflare - This connects to Contentful preview URL
- Netlify - This connects to Contentful production URL
For localhost, you can decide which Contentful server to connect to:
- Contentful Prod:
Only sets these env var (remove those related to preview)
shuwnyuan@Tees-MacBook-Pro:~/hivekind.com (main)$ cat .env.local
CONTENTFUL_SPACE_ID=xxx
CONTENTFUL_ACCESS_TOKEN=xxx
- Contentful Preview
shuwnyuan@Tees-MacBook-Pro:~/hivekind.com (main)$ cat .env.local
CONTENTFUL_SPACE_ID=xxx
CONTENTFUL_ACCESS_TOKEN=xxx
CONTENTFUL_PREVIEW_HOST=preview.contentful.com
CONTENTFUL_PREVIEW_ACCESS_TOKEN=xxx
You can get these values from: Contentful Settings -> API keys -> hivekind.com nextjs website
CONTENTFUL_SPACE_ID -> Space ID
CONTENTFUL_ACCESS_TOKEN -> Content Delivery API - access token
CONTENTFUL_PREVIEW_ACCESS_TOKEN -> Content Preview API - access token