Permalink
Browse files

modified: autoreload_example.js

	modified:   both_example.js
  • Loading branch information...
1 parent dac990f commit 4b0dec1d08e11f5c711d35854a3f168a858de3ce @shimondoodkin committed Aug 10, 2010
Showing with 7 additions and 1 deletion.
  1. +6 −0 autoreload_example.js
  2. +1 −1 both_example.js
View
@@ -9,8 +9,14 @@ autoreload.watchrel('mymodule_example.js', function (newmodule){
mymodule=newmodule;
//mymodule.moreinit(); // while this not finished you may get errors, because of not whell initilized your module.
});
+
+//autoreload.watchrel('mymodule_example.js', function (newmodule){ mymodule=newmodule; });
//autoreload.watch(mymodule.filename, function (newmodule){ mymodule=newmodule; }); // might not work if when started the module has errors or filename exports is missing
+
+mymodule.name="Shimon";
+
+
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end(mymodule.time() + '\n');
View
@@ -18,7 +18,7 @@ var sys = require('sys'),
http = require('http');
- mymodule.name="Shimon Doodkin";
+ mymodule.name="Shimon";
http.createServer(function (req, res) {

0 comments on commit 4b0dec1

Please sign in to comment.