Tailwind CSS, Next.js, Firebase
Install dependencies:
yarn install
Set up Firebase by creating a .env
file based on the contents of example.env
and adding your Firebase project
credentials.
Run the development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
To access the Firebase SDK, you need to use an initialized instance of the Firebase app. To do so, use firebaseApp
(exported from util/firebaseApp.ts
).
After importing firebaseApp
, you can use this to access the Firebase SDK.
To access Firebase Authentication from anywhere within the app, use the custom useAuth()
hook.
const {isAuthenticated, isLoading, user} = useAuth();
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.