Change IP server address

296 views
Skip to first unread message

Jackson Pires

unread,
Sep 29, 2014, 2:15:22 PM9/29/14
to tiddl...@googlegroups.com
Hi!

How I can change the ip address and port from server listener?
It's possible to let the server listen any incoming request on a specific port?

These my questions are because after I run the server (like below), and I'm trying to request via browser from other computer on the same lan, the server never response the resquest.

~$ tiddlywiki sotipafwiki --server
Serving on 127.0.0.1:8080
(press ctrl-C to exit)

In other test I run the script:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

Then I get the same error, but when I change the ip address for nothing, the resquests are accepted.


var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '');
console.log('Server running at http://127.0.0.1:1337/');


Sorry my noob questions, and sorry my poor english.


--
"Não sejas sábio aos seus próprios olhos..."
==============================


Jackson Pires de O. S. Júnior
~~~~~~~~~~~~~~~~~~~
Paulo Afonso - BA

Mania de Concurseiro: http://maniadeconcurseiro.com.br
Aulas de Ruby on Rails para iniciantes: http://www.youtube.com/user/jacksonpiresjr

Matthew DeAbreu

unread,
Sep 29, 2014, 7:42:40 PM9/29/14
to tiddl...@googlegroups.com
You can change the arguments passed to the server command to change what port and what IP it listens to.


--server 80 $:/core/save/all text/plain text/html "" "" 0.0.0.0

This command for example will make the server listen on all interfaces on port 80, but let's break it down so you understand what it means.
The first argument is the port (listening on port 80)
The second is which tiddler will be served (this will serve all tiddlers)
The third is what the tiddlers are saved as
The fourth is the tiddlers will be served as
The fifth is the username for edits (in this case blank)
The sixth is the password (also blank)
And finally the seventh is which interfaces to listen on, by setting this to 0.0.0.0 the server will be listening on all interfaces and people will be able to connect using your WAN IP, LAN IP, or your localhost

You can read more about the arguments accepted by the server command here: http://tiddlywiki.com/#ServerCommand

iani

unread,
Oct 6, 2014, 1:24:07 AM10/6/14
to tiddl...@googlegroups.com

Hello, 

this is what I use to boot my tiddlywikis on a server:

Following command is run on a remote login shell with ssh:

tiddlywiki --server 8086 "$:/core/save/all" "text/plain" "text/html" "iani" "" "larigot.avarts.ionio.gr" &

Then I can see my wiki at: 


Note: When I issue the command, the current path of the shell must be the top level of the folder containing the wiki that I want to serve.

You can change the port number or the name of the server to suit your needs.

Iannis Zannos 

PMario

unread,
Oct 6, 2014, 12:47:03 PM10/6/14
to tiddl...@googlegroups.com
Have a look at https://github.com/Jermolene/TiddlyWiki5/blob/master/bin/serve.sh  or serve.cmd (for windows)
You can add the edition path to start every wiki you want.

-mario
Reply all
Reply to author
Forward
0 new messages