Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
E
egg-example
Project
Project
Details
Activity
Releases
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
shangbj
egg-example
Commits
0745644c
Commit
0745644c
authored
Oct 12, 2018
by
尚斌杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加mysql数据库链接
parent
140670d8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
config.default.js
config/config.default.js
+13
-0
plugin.js
config/plugin.js
+5
-0
package.json
package.json
+3
-1
No files found.
config/config.default.js
View file @
0745644c
...
...
@@ -20,6 +20,19 @@ module.exports = appInfo => {
},
};
config
.
sequelize
=
{
dialect
:
'mysql'
,
// support: mysql, mariadb, postgres, mssql
dialectOptions
:
{
charset
:
'utf8mb4'
,
},
database
:
'egg-sequelize-example-dev'
,
host
:
'localhost'
,
port
:
'3306'
,
username
:
'root'
,
password
:
'shang4148'
,
timezone
:
'+08:00'
,
};
config
.
api
=
'https://club.m.autohome.com.cn'
;
return
config
;
...
...
config/plugin.js
View file @
0745644c
...
...
@@ -6,3 +6,8 @@ exports.ejs = {
enable
:
true
,
package
:
'egg-view-ejs'
,
};
// exports.sequelize = {
// enable: true,
// package: 'egg-sequelize',
// };
package.json
View file @
0745644c
...
...
@@ -6,8 +6,10 @@
"dependencies"
:
{
"
egg
"
:
"
^2.2.1
"
,
"
egg-scripts
"
:
"
^2.5.0
"
,
"
egg-sequelize
"
:
"
4.1.0
"
,
"
egg-view-ejs
"
:
"
^2.0.0
"
,
"
moment
"
:
"
^2.22.2
"
"
moment
"
:
"
^2.22.2
"
,
"
mysql2
"
:
"
1.6.1
"
},
"devDependencies"
:
{
"
autod
"
:
"
^3.0.1
"
,
...
...
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