Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
egg-websocket
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huanglu
egg-websocket
Commits
2029fc3c
Commit
2029fc3c
authored
Dec 14, 2020
by
huanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: config
parent
2dd25803
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
config.prod.ts
config/config.prod.ts
+9
-1
package.json
package.json
+1
-1
No files found.
config/config.prod.ts
View file @
2029fc3c
import
{
EggAppConfig
,
PowerPartial
}
from
'egg'
;
export
default
()
=>
{
const
config
:
PowerPartial
<
EggAppConfig
>
=
{};
const
cluster
=
{
listen
:
{
port
:
7001
,
hostname
:
'0,0,0,0'
,
// 不建议设置 hostname 为 '0.0.0.0',它将允许来自外部网络和来源的连接,请在知晓风险的情况下使用
},
};
const
config
:
PowerPartial
<
EggAppConfig
>
=
{
cluster
,
};
return
config
;
};
package.json
View file @
2029fc3c
...
...
@@ -8,7 +8,7 @@
"declarations"
:
true
},
"scripts"
:
{
"start"
:
"egg-scripts start --daemon --title=egg-websocket --sticky"
,
"start"
:
"
npm run tsc &&
egg-scripts start --daemon --title=egg-websocket --sticky"
,
"stop"
:
"egg-scripts stop --title=egg-server-geek-egg"
,
"dev"
:
"egg-bin dev --sticky"
,
"debug"
:
"egg-bin debug"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment