/firebase-next-routes-example

Next-route.js with Firebase functions

Primary LanguageJavaScriptOtherNOASSERTION

Next-routes with Firebase functions

For all information, please read the Medium post

Installation

git clone https://github.com/JulienHe/firebase-next-routes-example.git
cd firebase-next-routes-example
yarn install

It is recommended to use a package manager that uses a lockfile and caching for faster dev/test cycles:

Set up firebase:

Next.js Development

Standard Next.js development with Hot-module Reloading etc

yarn dev

Deploy to Firebase

You will need to connect the project to your Firebase project. Edit the name in .firebaserc or run firebase init and choose not to override any files.

Deploy Hosting resources and the rewrite Cloud Function

yarn deploy-app

Deploy functions not used for the SSR

Deploy all functions specified in the function group. Edit this script to add more function groups. - see Partial deploys docs for how to use function groups.

yarn deploy-funcs

Deploy everything to Firebase

yarn deploy-all

Clean dist Folder

yarn clean