Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you add a server to this example? #2

Closed
MarbilleJuntado opened this issue Apr 16, 2018 · 4 comments
Closed

Can you add a server to this example? #2

MarbilleJuntado opened this issue Apr 16, 2018 · 4 comments

Comments

@MarbilleJuntado
Copy link

So that we can do something like node app.js and test it locally?

@james2doyle
Copy link
Contributor

james2doyle commented Apr 16, 2018

You can run the firebase function locally:

"start": "NODE_ENV=local node index.js"

There are checks in the function to allow this.

Change to firebase functions folder and run npm run start which will trigger the function as if it was live in firebase

@MarbilleJuntado
Copy link
Author

MarbilleJuntado commented Apr 16, 2018

Thanks. However, why am I getting this error "registration ids field cannot be empty" when I run npm run start?

@james2doyle
Copy link
Contributor

I am guessing your database is empty and you have not added any subscribers to it

@MarbilleJuntado
Copy link
Author

Are you referring to the Firebase realtime database? How do I add subscribers to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants