mirror of
https://github.com/mathew-kurian/Scribe.js
synced 2025-04-24 22:34:58 +00:00
Prepping for heroku
This commit is contained in:
parent
3da6eea33e
commit
84de68de65
5 changed files with 77 additions and 56 deletions
2
Procfile.txt
Normal file
2
Procfile.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
web: node ./examples/webPanel.js
|
||||||
|
|
|
@ -5,9 +5,13 @@
|
||||||
app = express(),
|
app = express(),
|
||||||
console = process.console;
|
console = process.console;
|
||||||
|
|
||||||
|
app.set('port', (process.env.PORT || 5000));
|
||||||
|
|
||||||
app.use(scribe.express.logger()); //Log each request
|
app.use(scribe.express.logger()); //Log each request
|
||||||
|
|
||||||
app.listen(8080, function () {
|
var port = app.get("port");
|
||||||
console.time().log('Server listening at port 8080');
|
|
||||||
|
app.listen(port, function() {
|
||||||
|
console.time().log('Server listening at port ' + port);
|
||||||
});
|
});
|
||||||
}());
|
})();
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
app = express(),
|
app = express(),
|
||||||
console = process.console;
|
console = process.console;
|
||||||
|
|
||||||
|
app.set('port', (process.env.PORT || 5000));
|
||||||
|
|
||||||
//Create a Console2 for express
|
//Create a Console2 for express
|
||||||
//with logs saved in /expressLogger
|
//with logs saved in /expressLogger
|
||||||
var expressConsole = scribe.console({
|
var expressConsole = scribe.console({
|
||||||
|
@ -34,7 +36,9 @@
|
||||||
//Pass the console and the filter
|
//Pass the console and the filter
|
||||||
app.use(scribe.express.logger(expressConsole, validate));
|
app.use(scribe.express.logger(expressConsole, validate));
|
||||||
|
|
||||||
app.listen(8080, function () {
|
var port = app.get("port");
|
||||||
console.time().log('Server listening at port 8080');
|
|
||||||
|
app.listen(port, function() {
|
||||||
|
console.time().log('Server listening at port ' + port);
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
app = express();
|
app = express();
|
||||||
|
|
||||||
|
|
||||||
|
app.set('port', (process.env.PORT || 5000));
|
||||||
|
|
||||||
app.get('/', function(req, res) {
|
app.get('/', function(req, res) {
|
||||||
res.send('Hello world, see you at /logs');
|
res.send('Hello world, see you at /logs');
|
||||||
});
|
});
|
||||||
|
@ -24,7 +26,9 @@
|
||||||
c: [1, 2, 3]
|
c: [1, 2, 3]
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(3000, function () {
|
var port = app.get("port");
|
||||||
console.time().log('Server listening at port 3000');
|
|
||||||
|
app.listen(port, function() {
|
||||||
|
console.time().log('Server listening at port ' + port);
|
||||||
});
|
});
|
||||||
}());
|
})();
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
/* jshint -W079 */
|
/* jshint -W079 */
|
||||||
|
(function() {
|
||||||
var auth = require('http-auth'), // @see https://github.com/gevorg/http-auth
|
var auth = require('http-auth'), // @see https://github.com/gevorg/http-auth
|
||||||
express = require('express'),
|
express = require('express'),
|
||||||
app = express(),
|
app = express(),
|
||||||
scribe = require('../scribe')(),
|
scribe = require('../scribe')(),
|
||||||
console = process.console;
|
console = process.console;
|
||||||
|
|
||||||
|
|
||||||
|
app.set('port', (process.env.PORT || 5000));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User : test
|
* User : test
|
||||||
* Pwd : tes
|
* Pwd : tes
|
||||||
|
@ -32,6 +36,9 @@ console.tag('An object').log({
|
||||||
c: [1, 2, 3]
|
c: [1, 2, 3]
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(8080, function () {
|
var port = app.get("port");
|
||||||
console.time().log('Server listening at port 8080');
|
|
||||||
|
app.listen(port, function() {
|
||||||
|
console.time().log('Server listening at port ' + port);
|
||||||
});
|
});
|
||||||
|
})();
|
||||||
|
|
Loading…
Add table
Reference in a new issue