-
所有页面当页面后缀修改为 `.json` 时把当前页面的 assign 内容以 json 形式输出出来,方便制作接口。
-
## DESC
代码如下
``` javascript
//controller/index.js
indexAction() {
throw new Error('this is Error');
}
```
现在逻辑层的异常,不捕捉,统一抛出到controller层,然后现在想在controller error内的统一收集,或者其他方式收集可以,因为要监测API,所以…
-
pm2文件配置:
![image](https://cloud.githubusercontent.com/assets/17404085/24574797/c5d59cf8-16ca-11e7-9dd8-413b86ba094e.png)
nginx配置文件:
![image](https://cloud.githubusercontent.com/assets/17404085/24…
-
thinkjs提供了控制台日志,但是似乎没有提供文件日志,不太方便线上环境的监控
-
按照官网的例子,控制台一直输出以下信息:
/wechatweixin/wechat
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: PREVENT_NEXT_PROCESS
nodejs : 7.4
thinkjs : 2.2.1…
-
pm2 logs如下:
> You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
0|firekyli | Error: PREVENT_NEXT_PROCESS
0|firekyli | at Object.think.prevent (/data…
-
-
## DESC
在使用pm2 的**cluster模式**或在thinkjs中开启**cluster**情况下,使用官方示例以下代码:
> indexAction() {
let error = new Error("not found");
//将错误信息写到 http 对象上,用于模版里显示
this.http.error =…
-
- 我在 router.js 开头配置了 AV.init, 后发现,`npm run dev` 开启开发调试时,修改文件的热重载失效,请问我该把leancloud 配置在什么地方,同时使开发热重载有效?
- 然后在 controller 中 写 Leancloud 操作数据时,如果没有 加上 yield 会出现404 ,但没有明确说明原因,很无厘头的感觉,这块错误处理该怎么改善?
…
-
## DESC
使用2.2.16创建的 ts 版本项目编译报错
项目下所有 ts 文件都会编译报错内容如下:
`[2017-02-16 15:41:21] [COMPILE] compile file home/model/index.ts error
[2017-02-16 15:41:21] [Error] TypeError: Cannot read property 'getL…