How to use custom port for game preview server?

How to use custom port for game preview server?
0.0 0

#1

Actually, cocos uses 7456 as default port for your game preview server, and you can put it in your browser, with your IP:7456 to run the game, now I don’t link 7456, instead I want to put any other number, what to do for that, Please step-forward and answer, I couldn’t find any solution.


#2

It’s been two weeks, I still can’t find any solution. Or am I posting in wrong forum?


#3

you can use https://www.npmjs.com/package/http-server instead, but that would only work for the build directory.


#4

There is no way actually, using http-server is not recommended as there will be two servers, hmmm, i think cocos dev team will add this configurable preference prior to their upcoming updates.


#5

The only thing i know is that if you have a project opened and you open another one, the second one will use 7457 instead, so you can preview two or more projects at the same time. That’ss enough for me, why would you want to change the port?


#6

U r right, typing 7456 in my phone drives me crazy… LEL


#7

Well, you can always use the bidi/qr, but i prefer to write it hahaha


#8

How did I miss it, Thank you