Credits: This is a Next.js project bootstrapped with create-next-app.
To run the development server using:
npm run devOpen http://localhost:3000 with your browser to see the result.
Copy the .env.example as .env file. and add the environment variable shown there.
You can generate a secure JWT secret using OpenSSL with the following command:
openssl rand -base64 32Or if you prefer a manually generated secret, you can "spam the keyboard" and get one and add it in env
Follow next section in this guide to get Firebase related env
This project uses Firebase Realtime Database. Follow these steps to set up Firebase:
- Go to Firebase Console.
- Click Add Project and follow the setup process.
- In the Firebase Console
- Haven't created an app in the main pannel select Web App
- Give it a name and press Next
- Copy the SDK setup and configuration in to env
- In the Firebase Console Press Build Dropdown in Left side bar
- Scroll Down a bit if needed and Click Realtime Database
- Press Create Database in Main Panel
- Select proper region, press next
- Select Start in Test mode and press enable
- In the Real Time Database Main Panel Select Rules
- Copy rules from datamodel/firebaseRules.json
- Publish the rules
Run following command
npm installEnsure your Firebase setup is complete and start the development server:
npm run devNow your app should be connected to Firebase!
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.