This is the code behind a blog post of the same name.
You can see it in action at https://pwa-preact-firebase.firebaseapp.com, but it will require authing with Google to be useful.
- Preact CLI (Tooling)
- Firebase (Auth, Database, Hosting)
The best thing to do would be to create your own in Firebase and update the config, similar to how I do in the post. However, it should work if you:
- Clone the Repo
npm install
- Install Preact CLI
npm i -g preact-cli
preact watch
To have your own working version, there will be one additional step. Copy your Firebase config information from authentication > web setup and paste into firebase.js
. The group of items you'll want look like the data below, but with your details:
apiKey: 'AIzaSyBdk6HFp-9zT4oilTokoo4_e-ZX6uwR_Gg',
authDomain: 'pwa-preact-firebase.firebaseapp.com',
databaseURL: 'https://pwa-preact-firebase.firebaseio.com',
projectId: 'pwa-preact-firebase',
storageBucket: 'pwa-preact-firebase.appspot.com',
messagingSenderId: '263234041568'