Skip to content

Commit e3128d9

Browse files
committed
Fixed examples
1 parent 82d5e27 commit e3128d9

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

examples/expressjs/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
var wire = require('../../');
1+
var app = require('../../')(require('./config'));
2+
app.server.bootstrap(3000);
23

3-
wire(require('./config'), function(err, app) { // Composite root
4-
if (err) throw err;
5-
app.server.bootstrap(3000);
6-
});

examples/expressjs/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
module.exports.needs = ['express-app', 'winston'];
21
module.exports.fn = function($) {
32
var app = $["express-app"]();
43

@@ -12,3 +11,4 @@ module.exports.fn = function($) {
1211
bootstrap: bootstrap
1312
};
1413
}
14+
module.exports.needs = ['express-app', 'winston'];

examples/koajs/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
var wire = require('../../');
1+
var app = require('../../')(require('./config'));
2+
app.server.bootstrap(3000);
23

3-
wire(require('./config'), function(err, app) { // Composite root
4-
if (err) throw err;
5-
app.server.bootstrap(3000);
6-
});

examples/koajs/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
module.exports.needs = ['koa', 'winston', 'http'];
21
module.exports.fn = function($) {
32
var app = $.koa();
43
var server = $.http.Server(app.callback())
@@ -12,4 +11,5 @@ module.exports.fn = function($) {
1211
return {
1312
bootstrap: bootstrap
1413
};
15-
}
14+
}
15+
module.exports.needs = ['koa', 'winston', 'http'];

0 commit comments

Comments
 (0)