diff options
Diffstat (limited to 'pnhandler.js')
-rw-r--r-- | pnhandler.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pnhandler.js b/pnhandler.js new file mode 100644 index 0000000..4123049 --- /dev/null +++ b/pnhandler.js @@ -0,0 +1,45 @@ +/* + * pnhandler.js + * + * group of methods that handles different pathnames + */ + +var util = require('util'); + +function noop(query, res) { + util.log('[pnhandler] handling ' + query.pathname + + ', ok who the fuck is messing with us?'); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end(); +} + +function register(query, res) { + util.log('[pnhandler] handling ' + query.pathname); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end(); +} + +function login(query, res) { + util.log('[pnhandler] handling ' + query.pathname); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end(); +} + +function poll(query, res) { + util.log('[pnhandler] handling ' + query.pathname); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end(); +} + +function upload(query, res) { + util.log('[pnhandler] handling ' + query.pathname); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end(); +} + +exports.noop = noop; +exports.register = register; +exports.login = login; +exports.poll = poll; +exports.upload = upload; + |