From efcada9692524315914bade8508c87454d064ab4 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Mon, 12 May 2014 14:42:06 +0000 Subject: [PATCH] restructuring --- labs/demos/README.md | 6 +++++- labs/demos/index.coffee | 2 +- labs/demos/{ => lib}/handlers.coffee | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) rename labs/demos/{ => lib}/handlers.coffee (87%) diff --git a/labs/demos/README.md b/labs/demos/README.md index 42061c01a1..fc8cfcc85d 100644 --- a/labs/demos/README.md +++ b/labs/demos/README.md @@ -1 +1,5 @@ -README.md \ No newline at end of file +README.md + +coffee index.coffee + +Browse to port 4000 in the browser \ No newline at end of file diff --git a/labs/demos/index.coffee b/labs/demos/index.coffee index 41599b453e..230a4c8db4 100644 --- a/labs/demos/index.coffee +++ b/labs/demos/index.coffee @@ -3,7 +3,7 @@ http = require 'http' hapi = require 'hapi' path = require 'path' -handlers = require './handlers' +handlers = require './lib/handlers' app = express() app.set('port', process.env.PORT || 4000) diff --git a/labs/demos/handlers.coffee b/labs/demos/lib/handlers.coffee similarity index 87% rename from labs/demos/handlers.coffee rename to labs/demos/lib/handlers.coffee index b6595c0a77..810120776d 100644 --- a/labs/demos/handlers.coffee +++ b/labs/demos/lib/handlers.coffee @@ -1,7 +1,7 @@ #testapi = require 'testapi' index = (request, response) -> - response.sendfile('./views/index.html') + response.sendfile('../views/index.html') login = (req, resp) -> #not working yet console.log "req=" + JSON.stringify req.query.username