zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Allow configuration of URL "secret"

Open carlos8f opened this issue 10 years ago • 8 comments

carlos8f avatar Aug 24 '16 20:08 carlos8f

In your web server configuration you need to specify '0.0.0.0' as hostname otherwise it will start on an IPv6 address if available, not on IPv4 see: https://nodejs.org/api/net.html#net_server_listening "server.listen([port][, hostname][, backlog][, callback])#

Added in: v0.1.90 Begin accepting connections on the specified port and hostname. If the hostname is omitted, the server will accept connections on any IPv6 address (::) when IPv6 is available, or any IPv4 address (0.0.0.0) otherwise. "

Labseb avatar Sep 05 '16 08:09 Labseb

I'd love it if you specify hostname like you can port.

InfoAddict avatar Sep 05 '16 08:09 InfoAddict

i find it !! here is my new listen.js file: /zenbot/node_modules/motley/site/listen.js

module.exports = function container (get) { return function listen (cb) { get('site.server').listen(get('conf.site.port'), '0.0.0.0', cb) } }

So now, you can verify with "netstat -lnt" that your web server work on IPv4 on 0.0.0.0 and you can see graph from an other computer ;)

Labseb avatar Sep 05 '16 09:09 Labseb

Cool, I'll try this when I find some time. This is only for a local network right? Thanks!

JFD3D avatar Sep 05 '16 19:09 JFD3D

If you would like to change the web server port, modify it in /zenbot/plugins/server/command.json

"default": 3301 <-- replace here

Labseb avatar Sep 06 '16 07:09 Labseb

the best way it's to use a general config file to do it, but i'm not enough good in java to do it...

Labseb avatar Sep 06 '16 07:09 Labseb

You mean JavaScript not Java right?

JFD3D avatar Sep 06 '16 18:09 JFD3D

Yes JavaScript, sorry ;)

Labseb avatar Sep 07 '16 08:09 Labseb