0

I just added new Firebase project with the following in firebase.json:

  "emulators": {
    "functions": {
      "port": 5001
    },
    "hosting": {
      "port": 5002
    },

I started it with firebase serve. And it serves hosting on port 5000 (instead of 5002):

+  hosting: Local server: http://localhost:5000

Am I doing something wrong?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Leo
  • 4,136
  • 6
  • 48
  • 72

1 Answers1

5

firebase.json file doesn't work with the the firebase serve command. You have to use the firebase emulators:start command.

If you want to keep using firebase serve then it should be use like in:

firebase serve --only hosting --port=5002
Methkal Khalawi
  • 2,368
  • 1
  • 8
  • 13
  • Just to not confuse others: I think you mean that the "emulators" part does not work with `firebase serve`. – Leo Nov 16 '20 at 18:19