Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.06 KB

File metadata and controls

41 lines (29 loc) · 1.06 KB

Next.js / typescript / firebase hosted

Based off the SSR sample in: https://github.com/firebase/functions-samples

Added features are:

  • combined client & server apps to share package.json dependancies
  • added typescript precompile step
  • simplified folder structure

Host your SSR Next.js app on Cloud Functions with Firebase Hosting rewrite rules. Using a rewrite rule that catches ALL routes we can then host our SSR app on our Firebase Hosting URL instead of the Firebase Cloud Function URL.

How to use

git clone https://github.com/tonypee/nextjs-typescript-firebase-hosted
cd nextjs-typescript-firebase-hosted
yarn

Set up firebase:

Install project:

yarn

Run Next.js development:

yarn dev

Deploy it to the cloud with Firebase

yarn deploy