0

I'm trying to serve firebase functions for testing in cloud9. I'm doing the following:

$ firebase serve --only functions -o $IP -p $PORT

=== Serving from '/home/ubuntu/workspace'...

i  functions: Preparing to emulate functions.
✔  functions: myFunction: http://localhost:8080/myapp/us-central1/myFunction

This seems to work, but going to

http://myC9App-nicholasstephan.c9users.io:8080/myFirebaseApp/us-central1/myFunction

Gives me the c9 "No application seems to be running here!" screen.

What gives? Is there any way to test firebase functions through the emulator in c9?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
nicholas
  • 14,184
  • 22
  • 82
  • 138

1 Answers1

1

Try this:

  • Step 1

    $ firebase serve -o 0.0.0.0 -p 8000

  • Step 2:

    Go to ec2 security groups and add a custom TCP rule through port 8000

  • Step 3:

    Copy your public ip and on your browser, type (your ip):8000, e.g. 54.21.213.7:8000

Unheilig
  • 16,196
  • 193
  • 68
  • 98
ENDEESA
  • 3,373
  • 2
  • 21
  • 17