Gatsby: Is there a way to specify a port other than 8000 for the development server?

Created on 11 Nov 2016  路  6Comments  路  Source: gatsbyjs/gatsby

I use cloud9 as my IDE and I cant preview anything running on any port other than 3000.

Most helpful comment

For anyone still trying, the solutions is to include also the host as a flag, like this:

$ gatsby develop -p $PORT -H $IP

All 6 comments

I was using npm run develop instead of gatsby develop.

I'm trying to do the same thing. I tried to change the port by entering "gatsby develop -p 8080" but it did not work cloud9 says there's no app running at 8080. The npm run develop also did not work.

Same issue

Note that if you use gatsby serve -p 8080 after building, then it does work on c9 ide

For anyone still trying, the solutions is to include also the host as a flag, like this:

$ gatsby develop -p $PORT -H $IP
Was this page helpful?
0 / 5 - 0 ratings

Related issues

theduke picture theduke  路  3Comments

benstr picture benstr  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

kalinchernev picture kalinchernev  路  3Comments