2014-06-02 17:00:24 -04:00
|
|
|
var express = require('express');
|
|
|
|
|
var http = require('http');
|
|
|
|
|
var app = express();
|
2014-04-20 16:46:03 -03:00
|
|
|
|
2014-06-02 17:00:24 -04:00
|
|
|
app.start = function(port, callback) {
|
2014-04-20 16:46:03 -03:00
|
|
|
|
2014-06-02 17:00:24 -04:00
|
|
|
app.set('port', port);
|
|
|
|
|
app.use(express.static(__dirname));
|
2014-04-20 16:46:03 -03:00
|
|
|
|
2014-06-02 17:00:24 -04:00
|
|
|
app.listen(port, function() {
|
|
|
|
|
callback('http://localhost:' + port);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
module.exports = app;
|