- Copy
.env.example
to.env
and adjust variable values. - Generate Firebase admin credentials file and place on the project root as
service-account.json
. - [deployment only] Create
.firebaserc
on the project root folder, changing the Firebase project name as on the following example:
{
"projects": {
"default": "utopian-io"
}
}
Build for server usage (HTTPS server outside firebase).
npm run build:server
Build for firebase deployment.
npm run build:firebase
Run development server:
npm run dev
For firebase deployments, the firebase sdk must be installed globally:
npm install -g firebase-tools
Then, login with valid credentials
firebase login
And finally, deploy.
firebase deploy --only functions
npm run start
// OR
node ./bin/www