Skip to content

Commit 4f9e03d

Browse files
committed
bump version
1 parent f72f55d commit 4f9e03d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

lib/index.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = function(config) {
1919
list.push({ name, start, stop });
2020
}
2121

22-
app.start = async() => {
22+
app.start = async(opts = {}) => {
2323
debug('app.start');
2424
for (const item of list) {
2525
if (typeof item.start === 'function') {
@@ -28,10 +28,13 @@ module.exports = function(config) {
2828
}
2929
}
3030

31-
const port = (config.server || {}).port || 3000;
32-
const server = app.listen(port);
33-
global.console.log(`server listen at: ${port}`);
34-
return server;
31+
const { listen = true } = opts;
32+
if (listen) {
33+
const port = (config.server || {}).port || 3000;
34+
const server = app.listen(port);
35+
global.console.log(`server listen at: ${port}`);
36+
return server;
37+
}
3538
};
3639

3740
app.stop = async() => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "avada",
3-
"version": "1.4.0",
3+
"version": "1.5.0-beta.1",
44
"description": "A nodejs web framework basedon koa.",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)