sapper-on-firebase Svelte Themes

Sapper On Firebase

Showcases the installation of a Svelte/Sapper app backed by firebase functions

Svelte/Sapper on firebase functions

This repo showcases the installation of a Svelte/Sapper app backed by firebase functions. It doesn't use express nor polka (although it can me easily added). It only use the auto-generated sapper middleware as the main firebase function handler.

Get started

  • Go to src/client.js and add your firebase stuff/config.
  • Create your .firebaserc by coping the given example: cp .firebaserc.example .firebaserc and complete with your stuff.
  • Create your firebase.json file by coping the given example: cp firebase.example.json firebase.json and complete with your stuff.

Serve everything locally

$ npm run build-dev && cd functions && npm run serve

The above will run:

  • $ NODE_ENV=development sapper build: builds a dev version of your sapper/svelte app.
  • $ firebase serve: run your firebase project locally.

Build & Deploy to firebase

# build for production
$ npm run build
$ cd functions && npm run deploy

Top categories

Loading Svelte Themes