tom
unread,Jan 31, 2012, 7:18:40 AM1/31/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to no...@googlegroups.com
when run https in default port(443), now.js could not serve file on 443. the fix below maybe helpful.
Index: node_modules/now/lib/fileServer.js
===================================================================
--- node_modules/now/lib/fileServer.js (revision 889)
+++ node_modules/now/lib/fileServer.js (working copy)
@@ -75,7 +75,7 @@
// Determine hostname / port if not given in options
var host = request.headers.host.split(':');
var hostServer = options['host'] || host[0];
- var hostPort = options['port'] || host[1] || '80';
+ var hostPort = options['port'] || host[1] || ((request.headers.referer.split(':')[0] === 'https') ? '443' : '80');
// Call generate client libs, which takes the desired host/port and executes callback with two parts of now.js as parameters
generateClientLibs(hostServer, hostPort, function (nowText) {
Best regards
Tom