can I change the host to be my host machine name instead of using the loca host address in the tutorial?

10 views
Skip to first unread message

saywow

unread,
Nov 6, 2013, 1:09:08 PM11/6/13
to part...@googlegroups.com
Hi there:

I am following the tutorial , however in the index.js, it does not seem to allow me to use my machine host name instead of a local host?
do I just assign framewor.ip = my hostname?
Thank you in advance


var framework = require('partial.js');
var http = require('http');

var debug = true;
console.log(framework.ip);
console.log(framework.port);
framework.run(http, debug, 8005);
console.log('http://{0}:{1}/'.format(framework.ip, framework.port));


Peter Širka

unread,
Nov 6, 2013, 1:15:36 PM11/6/13
to part...@googlegroups.com
Hi saywow,

// framework.ip === '';
// framework.port === 0;

framework.run(http, debug, [port], [ip], [options]);

// framework.ip === by [ip] == default 127.0.0.1;
// framework.port === by [port] == default 8000;

Your hostname?
No or maybe. Hostname is defined in HTTP header. If you are using reverse proxy then framework.ip does not contain a hostname.

I have keying mistake ... default IP is 127.0.0.1 not localhost

----

A few minutes I'll publish new version of partial.js. Thanks!

Reply all
Reply to author
Forward
0 new messages