Getting 'Cannot GET /' when trying to connect to localhost:5000 Firebase

sinake picture sinake · Oct 31, 2016 · Viewed 7k times · Source

I am trying to get my localhost server on Firebase to work but I am continuing to get the following message in the browser 'Cannot GET /'. I took a look in the console and all it says is 'http://localhost:5000/ 404 (Not Found)'.

I have tried re-running the server using 'firebase serve' and that doesn't help. I ran 'firebase init' again and that didn't help either. I re-installed the firebase tools by running 'npm install -g firebase-tools' and then running firebase serve again and still nothing.

Not sure whats going on because it was initially working. I installed some grunt plugins and moved my index.html file under an html folder although I still have an index.html file under the public folder it still says 'Cannot GET /'

I have also tried in different browsers restarting them etc.

I am using a Mac OS X El Capitan.

Let me know if you need any more info. Thanks in advance

Answer

Max Terry picture Max Terry · Jan 25, 2017

I had this issue running firebase serve from within the scripts directory in the "Friendly Chat" tutorial. Starting the server from the parent directory got it working again as expected.