Open baocaifeng opened 6 years ago
mongod --dbpath /path --port num
when writing a code we write tests to automatically check our code is working as we expect it to. assert is the most rudimentary way to write tests. it provides no feedback when running your code except one fails.
return 用于提前结束流程,如果是多重回调,return比if----else更加明显 callback回调函数的参数列表可以自己定义,如果使用第三方库,参考具体的API文档怎么规定的
1) In node application, any async function accepts a callback as the last parameter and a callback function accepts an error as the first parameter