Permalink
Browse files

README

  • Loading branch information...
1 parent 79495dc commit 8201e9b45179988dca27361289656291949aae5a @gonzalo123 committed Jul 24, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 README
View
18 README
@@ -1 +1,19 @@
PHP session handler with node.js
+
+
+var http = require('http'),
+ url = require('url'),
+ session = require('nodePhpSessions').SessionHandler;
+
+var sessionHandler = new session();
+
+var server = http.createServer(function (req, res) {
+ var parsedUrl = url.parse(req.url, true).query;
+ res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.end(sessionHandler.run(parsedUrl));
+});
+
+server.listen(5672, "127.0.0.1", function() {
+ var address = server.address();
+ console.log("opened server on %j", address);
+});

0 comments on commit 8201e9b

Please sign in to comment.