Http server in Cloud9 autorun

12 views
Skip to first unread message

bchen...@gmail.com

unread,
May 25, 2016, 8:20:44 AM5/25/16
to BeagleBoard
Hello,
I have been creating my http server running in BBB with the standard method, create an server and listen in port 8888..
var server = http.createServer(function (req, res) {}).listen(8888); And it works fine.

But when i placed the JS file in cloud9/autorun folder, it dosen't work anymore. As i understand, the autorun program has already occupied the listening port 8888, and caused the conflict of using port 8888.

So i wonder if there is any solution behind this? Can't i use both of autorun mecanism and listening port 8888, or i have to give up one of these two? Or there is another port number to use to build the http server?  

Thanks,
Chen



Dennis Lee Bieber

unread,
May 25, 2016, 9:38:35 PM5/25/16
to beagl...@googlegroups.com
On Wed, 25 May 2016 02:28:26 -0700 (PDT),
bchen...@gmail.com declaimed the following:

>
>But when i placed the JS file in cloud9/autorun folder, it dosen't work
>anymore. As i understand, the autorun program has already occupied the
>listening port 8888, and caused the conflict of using port 8888.
>
>So i wonder if there is any solution behind this? Can't i use both of
>autorun mecanism and listening port 8888, or i have to give up one of these
>two? Or there is another port number to use to build the http server?
>

There is nothing sacred about 8888.

Formal HTTP servers normally bind to port 80.

Any port number >1024 is a non-reserved port, and does not need special
privileges to use.

A common choice for "user" HTTP servers is port 8080.
--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Reply all
Reply to author
Forward
0 new messages