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(),
|
||||
console = process.console;
|
||||
|
||||
app.set('port', (process.env.PORT || 5000));
|
||||
|
||||
app.use(scribe.express.logger()); //Log each request
|
||||
|
||||
app.listen(8080, function () {
|
||||
console.time().log('Server listening at port 8080');
|
||||
var port = app.get("port");
|
||||
|
||||
app.listen(port, function() {
|
||||
console.time().log('Server listening at port ' + port);
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
app = express(),
|
||||
console = process.console;
|
||||
|
||||
app.set('port', (process.env.PORT || 5000));
|
||||
|
||||
//Create a Console2 for express
|
||||
//with logs saved in /expressLogger
|
||||
var expressConsole = scribe.console({
|
||||
|
@ -34,7 +36,9 @@
|
|||
//Pass the console and the filter
|
||||
app.use(scribe.express.logger(expressConsole, validate));
|
||||
|
||||
app.listen(8080, function () {
|
||||
console.time().log('Server listening at port 8080');
|
||||
var port = app.get("port");
|
||||
|
||||
app.listen(port, function() {
|
||||
console.time().log('Server listening at port ' + port);
|
||||
});
|
||||
}());
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
app = express();
|
||||
|
||||
|
||||
app.set('port', (process.env.PORT || 5000));
|
||||
|
||||
app.get('/', function(req, res) {
|
||||
res.send('Hello world, see you at /logs');
|
||||
});
|
||||
|
@ -24,7 +26,9 @@
|
|||
c: [1, 2, 3]
|
||||
});
|
||||
|
||||
app.listen(3000, function () {
|
||||
console.time().log('Server listening at port 3000');
|
||||
var port = app.get("port");
|
||||
|
||||
app.listen(port, function() {
|
||||
console.time().log('Server listening at port ' + port);
|
||||
});
|
||||
}());
|
||||
})();
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
/* jshint -W079 */
|
||||
(function() {
|
||||
var auth = require('http-auth'), // @see https://github.com/gevorg/http-auth
|
||||
express = require('express'),
|
||||
app = express(),
|
||||
scribe = require('../scribe')(),
|
||||
console = process.console;
|
||||
|
||||
|
||||
app.set('port', (process.env.PORT || 5000));
|
||||
|
||||
/**
|
||||
* User : test
|
||||
* Pwd : tes
|
||||
|
@ -32,6 +36,9 @@ console.tag('An object').log({
|
|||
c: [1, 2, 3]
|
||||
});
|
||||
|
||||
app.listen(8080, function () {
|
||||
console.time().log('Server listening at port 8080');
|
||||
var port = app.get("port");
|
||||
|
||||
app.listen(port, function() {
|
||||
console.time().log('Server listening at port ' + port);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Reference in a new issue