forked from mirrors/Scribe.js
Starting herokuapp
This commit is contained in:
parent
4540ad5205
commit
22f5104192
3 changed files with 37 additions and 5 deletions
35
herokuapp/app.js
Normal file
35
herokuapp/app.js
Normal file
|
@ -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);
|
||||||
|
});
|
||||||
|
})();
|
0
herokuapp/index.html
Normal file
0
herokuapp/index.html
Normal file
|
@ -7,11 +7,8 @@
|
||||||
|
|
||||||
<title>{{title}} - ScribeJS</title>
|
<title>{{title}} - ScribeJS</title>
|
||||||
|
|
||||||
<link
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
|
||||||
href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700'
|
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400,700' rel='stylesheet' type='text/css'>
|
||||||
rel='stylesheet'
|
|
||||||
type='text/css'>
|
|
||||||
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:300,400,700' rel='stylesheet' type='text/css'>
|
|
||||||
<link rel="stylesheet" href="lib/ng-toggle.css" type="text/css">
|
<link rel="stylesheet" href="lib/ng-toggle.css" type="text/css">
|
||||||
<link rel="stylesheet" href="lib/autocomplete.css" type="text/css">
|
<link rel="stylesheet" href="lib/autocomplete.css" type="text/css">
|
||||||
<link href="style.css" rel="stylesheet" type="text/css">
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
|
Loading…
Add table
Reference in a new issue