/Functions
- Express
/Hosting
- React
First, prepare .env file and set API key.
touch .env
echo "REDIRECT_URI=localhost:8080/api/callback" >> .env
echo "CLIENT_ID=xxxxxxxxxx" >> .env
echo "CLIENT_SECRET=xxxxxxxxxxxxxxxxxx" >> .env
echo "REACT_APP_LIFF_ID=xxxxxxxxxxxxx" >> .env
Second, install dependencies. And then run the development server:
npm i
npm run dev
You must install Firebase CLI
npm install -g firebase-tools
firebase login
npm run dev
NOTE: You must set CLIENT_ID
and CLIENT_SECRET
as Secrets to emulate and deploy on firebase.
firebase functions:secrets:set CLIENT_ID
firebase functions:secrets:set CLIENT_SECRET
You only need to do this operation once.
npm run build
firebase emulators:start
npm run build
firebase deploy