From 22f5104192b4fbcd84e9921177b149d233d50d90 Mon Sep 17 00:00:00 2001 From: Mathew Kurian Date: Mon, 22 Dec 2014 22:43:57 -0600 Subject: [PATCH] Starting herokuapp --- herokuapp/app.js | 35 +++++++++++++++++++++++++++++++++++ herokuapp/index.html | 0 static/index.html | 7 ++----- 3 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 herokuapp/app.js create mode 100644 herokuapp/index.html diff --git a/herokuapp/app.js b/herokuapp/app.js new file mode 100644 index 0000000..7e51507 --- /dev/null +++ b/herokuapp/app.js @@ -0,0 +1,35 @@ +/* jshint -W079 */ +(function() { + var scribe = require('../scribe')(), + console = process.console, + express = require('express'), + app = express(); + + + app.set('port', (process.env.PORT || 5000)); + + app.get('/', function(req, res) { + res.send('Hello world, see you at /logs'); + }); + + app.use(scribe.express.logger()); //Log each request + + app.use('/logs', scribe.webPanel()); + + //Make some logs + console.addLogger('debug', 'red'); + console.addLogger('fun', 'red'); + + console.time().fun('hello world'); + console.tag('This is a test').debug('A test'); + console.tag('An object').log({ + a: 'b', + c: [1, 2, 3] + }); + + var port = app.get("port"); + + app.listen(port, function() { + console.time().log('Server listening at port ' + port); + }); +})(); diff --git a/herokuapp/index.html b/herokuapp/index.html new file mode 100644 index 0000000..e69de29 diff --git a/static/index.html b/static/index.html index 91fe95a..5cab12f 100644 --- a/static/index.html +++ b/static/index.html @@ -7,11 +7,8 @@ {{title}} - ScribeJS - - + +