This project lets you create links that only NFT holders can view.
Requirements: node-v16.8.0, Google Firebase
- The whole project runs on Firebase, so to deploy you would first create a Firebase project.
- Edit src/utils/firebase.js Firebase config
- Edit src/utils/eth.js config
- Edit .firebaserc add your Firebase project id
- Go to your project folder and install packages
$ yarn
- Build frontend
$ yarn build && firebase deploy --except functions
- Go to ./functions folder and install packages
$ yarn
- Install Firebase Tools
$ sudo npm install -g firebase-tools
- Set firebase as prefix
$ alias firebase="`npm config get prefix`/bin/firebase"
- Set env vars on firebase with the following command. Please use your own bugsnag.com API key for a nodejs project and an Infura ethereum https RPC URL. read more about it: https://firebase.google.com/docs/functions/config-env
$ firebase functions:config:set bugsnag.apikey="put_a_bugsnag+apikey_here" infura.url="put_your_infura_url_here"
- Install Firebase backend
$ firebase deploy --only functions
$ Failed to authenticate, have you run ?
The command pop up a new window login with the same id that you used for firebase db ,once logged in it will give you a string copy that string and paste in your terminal.
$ firebase login --no-localhost
$ Cannot read property 'apikey' of undefined
You need to set 2 env vars. You need a bugsnag.com key for a nodejs project and an infura eth http rpc URL.
$ firebase functions:config:set bugsnag.apikey="put_a_bugsnag+apikey_here" infura.url="put_your_infura_url_here"
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Note that you need the firebase functions to be deployed for this to work.