Skip to content

Commit 14d3d67

Browse files
committed
fix: 🐛 egg.js 修复window本地开发问题
1 parent f0240ef commit 14d3d67

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

update.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web-framework/nodejs/thinkjs
1+
web-framework/nodejs/egg

web-framework/nodejs/egg/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Type: Application
22
Name: start-egg
33
Provider:
44
- 阿里云
5-
Version: 1.2.21
5+
Version: 1.2.22
66
Description: 为企业级框架和应用而生(部署到Custom运行时)
77
HomePage: https://github.com/devsapp/start-web-framework
88
Tags:

web-framework/nodejs/egg/src/code/app/public/.keep

Whitespace-only changes.

web-framework/nodejs/egg/src/code/package.json

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,23 @@
88
},
99
"dependencies": {
1010
"egg": "^2.15.1",
11-
"egg-scripts": "^2.11.0",
1211
"egg-view-nunjucks": "^2.2.0"
1312
},
1413
"devDependencies": {
15-
"autod": "^3.0.1",
16-
"autod-egg": "^1.1.0",
17-
"egg-bin": "^4.11.0",
18-
"egg-ci": "^1.11.0",
19-
"egg-mock": "^3.21.0",
2014
"eslint": "^5.13.0",
2115
"eslint-config-egg": "^7.1.0"
2216
},
2317
"engines": {
2418
"node": ">=10.0.0"
2519
},
2620
"scripts": {
27-
"start": "egg-scripts start --daemon --title=egg-server-eggjs",
28-
"stop": "egg-scripts stop --title=egg-server-eggjs",
29-
"dev": "egg-bin dev",
30-
"debug": "egg-bin debug",
31-
"test": "npm run lint -- --fix && npm run test-local",
32-
"test-local": "egg-bin test",
33-
"cov": "egg-bin cov",
34-
"lint": "eslint .",
35-
"ci": "npm run lint && npm run cov",
36-
"autod": "autod"
37-
},
38-
"ci": {
39-
"version": "10"
21+
"start": "node ./start.js",
22+
"lint": "eslint ."
4023
},
4124
"repository": {
4225
"type": "git",
4326
"url": ""
4427
},
45-
"author": "vangie",
28+
"author": "mamba",
4629
"license": "MIT"
4730
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict';
2+
3+
/**
4+
* docker 中 node 路径:/var/lang/node12/bin/node
5+
* NODE_LOG_DIR 是为了改写 egg-scripts 默认 node 写入路径(~/logs)-> /tmp
6+
* EGG_APP_CONFIG 是为了修改 egg 应有的默认当前目录 -> /tmp
7+
*/
8+
9+
const { Application } = require('egg');
10+
11+
const app = new Application({
12+
mode: 'single',
13+
});
14+
15+
app.listen(9000, '0.0.0.0', () => {
16+
console.log('Server start on http://0.0.0.0:9000');
17+
});

0 commit comments

Comments
 (0)