Open
Conversation
Contributor
|
程式碼可以用
包起來 |
Contributor
src/server/test.js
Outdated
| console.log('Connection has been established successfully'); | ||
| }) | ||
| .done(); | ||
|
|
Author
There was a problem hiding this comment.
sequelize.authenticate().complete(function (err) {
if (err) {
console.log('There is connection in ERROR');
} else {
console.log('Connection has been established successfully');
}
});
上面是它原本的寫法,我在想說為甚麼不能像上面一樣用complete
Contributor
There was a problem hiding this comment.
我沒有看到 complete 的關鍵字,請指出所在行號
Contributor
|
程式碼可以不用重覆貼,你所標註的地方就有你的程式碼了 |
src/server/testadd.js
Outdated
| }) | ||
|
|
||
| return app; | ||
| } |
Contributor
There was a problem hiding this comment.
這部分可以不用為了單獨測試 add function 而開一個 server 喔,可以在下方的 add.test.js 直接 import add.js 呼叫 add(1,1) 做測試
Author
|
不知道這樣的寫法是不是作業要求? |
Author
|
好像終於沒有"X"了~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

遇到一些問題
望大大幫忙解答m(_ _)m
像是這個的complete它會說not define
這個的success也是