0

I've just started developing a few different express apps that will ultimately be hosted on google app engine(standard). App engine docs specified to listen to port 8080, which I've done successfully.

Is '8080' specified by app engine?

compassClub
  • 146
  • 8
  • Possible duplicate of [Changing Node.js listening port](https://stackoverflow.com/questions/12181253/changing-node-js-listening-port) – Thomas Milox Mar 02 '19 at 01:18

2 Answers2

1

The port number is configurable. 8080 is a common convention to be used for HTTP servers, but technically it makes no difference what available port you use. The exceptions to ports you can use for your app are the Well-known ports. You should take into account your environment's security policies while setting ports numbers.

Akashdeep Singh
  • 388
  • 4
  • 14
0

As Akashdeep Singh said the port 8080 is used for HTTP protocols. If you want to change the port your app listens to, you can add these lines in the end of your index.js file.

const port = 3000;
app.listen(port, () => console.log(`Listening in port ${port}...`));

The const port can be whatever you want it to be.

Giannis
  • 312
  • 2
  • 5
  • 16