Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求教 #43

Open
yilianziyu opened this issue Sep 26, 2020 · 1 comment
Open

求教 #43

yilianziyu opened this issue Sep 26, 2020 · 1 comment

Comments

@yilianziyu
Copy link

`修改连接参数(使用 Sequelize 替代了 Sails 框架中默认的 Waterline)

vi config/connections.js
sequelizeServer: {
user: 'xxx',
password: 'xxx',
database: 'wedding',
options: {
dialect: 'mysql',
dialectOptions: {
charset: 'utf8mb4'
},
host: '127.0.0.1',
port: 3306,
logging: true,
timezone: "+08:00",
}
}`

新手不太了解这一段不是太了解啊……我这边sails运行起来了,能够从网页端进去,微信的测试号各项也输完了,但是到了微信开发者工具发现根本登不进去,提示授权失败。

@yilianziyu
Copy link
Author

我是在树莓派上运行的。具体日志记录是:
`pi@raspberrypi:~/wedding $ sails lift

info: Starting app...

verbose: logger hook loaded successfully.
verbose: request hook loaded successfully.
verbose: Loading blueprint middleware...
verbose: blueprints hook loaded successfully.
verbose: responses hook loaded successfully.
verbose: controllers hook loaded successfully.
verbose: Loading policy modules from app...
verbose: Finished loading policy middleware logic.
verbose: policies hook loaded successfully.
verbose: services hook loaded successfully.
verbose: csrf hook loaded successfully.
verbose: cors hook loaded successfully.
i18n:debug will write to /home/pi/wedding/config/locales/en.json +0ms
i18n:debug read /home/pi/wedding/config/locales/en.json for locale: en +3ms
i18n:debug will write to /home/pi/wedding/config/locales/es.json +1ms
i18n:debug read /home/pi/wedding/config/locales/es.json for locale: es +0ms
i18n:debug will write to /home/pi/wedding/config/locales/fr.json +2ms
i18n:debug read /home/pi/wedding/config/locales/fr.json for locale: fr +0ms
i18n:debug will write to /home/pi/wedding/config/locales/de.json +1ms
i18n:debug read /home/pi/wedding/config/locales/de.json for locale: de +0ms
verbose: i18n hook loaded successfully.
verbose: session hook loaded successfully.
verbose: grunt hook loaded successfully.
verbose: http hook loaded successfully.
verbose: Overriding ejs engine config with ejslocals to implement layout support...
verbose: Preparing socket.io...
verbose: sockets hook loaded successfully.
verbose: Autoreload watching: [ 'api/models', 'api/controllers', 'api/services', 'config/locales' ]
verbose: _sails-hook-autoreload@0.13.2@sails-hook-autoreload hook loaded successfully.
verbose: Using connection named sequelizeServer
verbose: Migration: safe
verbose: Loading model 'CheckinStatus'
verbose: Loading model 'Feeds'
verbose: Loading model 'WxAccount'
verbose: _sails-hook-sequelize@1.0.1@sails-hook-sequelize hook loaded successfully.
verbose: Preparing socket.io...
verbose: sails-hook-sockets@0.12.3@sails-hook-sockets hook loaded successfully.
verbose: Autoreload watching: [ 'api/models', 'api/controllers', 'api/services', 'config/locales' ]
verbose: autoreload hook loaded successfully.
verbose: Using connection named sequelizeServer
verbose: Migration: safe
verbose: Loading model 'CheckinStatus'
verbose: Loading model 'Feeds'
verbose: Loading model 'WxAccount'
verbose: sequelize hook loaded successfully.
verbose: views hook loaded successfully.
verbose: Setting default Express view engine to ejs...
verbose: Built-in hooks are ready.
verbose: Instantiating registry...
verbose: Loading router...
verbose: Policy-controller bindings complete!
verbose: All hooks were loaded successfully.
verbose: Starting app at /home/pi/wedding...
verbose: Running the setup logic in sails.config.bootstrap(cb)...
info:
info: .-..-.
info:
info: Sails <| .-..-.
info: v0.11.5 |
info: /|.
info: / ||
info: ,' |'
info: .-'.-==|/
--'
info: --'-------' info: __---___--___---___--___---___--___ info: ____---___--___---___--___---___--___-__ info: info: Server lifted in /home/pi/wedding`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press + C at any time.

debug: --------------------------------------------------------
debug: :: Sat Sep 26 2020 19:22:15 GMT+0800 (GMT+08:00)

debug: Environment : development
debug: Port : 1337
debug: --------------------------------------------------------
verbose: sails-hook-sockets :: connected to Sails admin message bus.
verbose: sails-hook-sockets :: connected to Sails admin message bus.
Requested :: GET /
Requested :: GET /home/resolve?code=0318我是马赛克****0U&state=
Requested :: GET /home/reauth
verbose: Rendering view: "reauth" (located @ "/home/pi/wedding/views/reauth")
verbose: • using configured layout:: layout.alert (located @ "/home/pi/wedding/views/layout.alert")
(node:11619) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
Requested :: GET /styles/weui.min.css
Requested :: GET /styles/home.css
Requested :: GET /styles/jquery.fullpage.min.css
Requested :: GET /styles/slick.css
Requested :: GET /styles/wall.css
Requested :: GET /styles/jquery.fullpage.min.css.map
verbose: Sending 404 ("Not Found") response
Requested :: GET /home/resolve?code=091WPCll25Y1G54wpdml2U17Lm0WPCl0&state=
Requested :: GET /home/reauth
verbose: Rendering view: "reauth" (located @ "/home/pi/wedding/views/reauth")
verbose: • using configured layout:: layout.alert (located @ "/home/pi/wedding/views/layout.alert")
Requested :: GET /styles/weui.min.css
Requested :: GET /styles/home.css
Requested :: GET /styles/jquery.fullpage.min.css
Requested :: GET /styles/slick.css
Requested :: GET /styles/wall.css
Requested :: GET /styles/jquery.fullpage.min.css.map
verbose: Sending 404 ("Not Found") response`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant