-
## DESC
如题,
1. think new demo
2. node production.js
3. 在indexAction中 console.log(think.env)
4. 显示 development
不是应该显示 production 嘛?
## ENV
Platform: thinkjs 3.0
Node.js Version: 8.1.2
…
-
thinkjs3 怎么配置端口啊
-
## 如题
### ENV
OS Platform:
Node.js Version:8.4.0
ThinkJS Version:3.0.0
### code
```js
this.allowMethods = 'post';
// // 定义规则
let rules = {
userName: {…
-
/home/controller/public.js
```javascript
async ajaxyzAction(){
// const username = this.ctx.param('username');
const users_db = think.model('users');
const data = await users_db.getDa…
-
## DESC
grpc与thinkjs结合过程中在处理函数中无法调用thinkjs中的think.service、think.model等.
代码如下:
```js
/**
* 自动加载proto并且运行Server
* @param {string} protoDir 存放proto说明文件的文件夹
* create by xingbo 17…
-
## DESC
我看官方文档里面有我标题所需的配置,
https://thinkjs.org/zh-cn/doc/3.0/logic.html#field
但是就没明白例子如何写? 无从下手, 求大拿给一个例子做参考!
非常感谢!
-
## DESC
请问,如果在非 ctx、controller、logic 中调用cookie,该怎么处理,比如在启动项自定义文件中读取cookie,现在这么写:
```js
global.token = function (ctx) {
let token = ctx.cookie('token') ? ctx.cookie('token') : '';
return…
-
我用 thinkjs -v 看到的是 v1.0.8
我想升级thinkjs版本 用了 npm update 命令,提示我: ` thinkjs@3.0.0-beta4 invalid`
请问咋办?
-
我在设置think-trace的contentType后,运行程序引起如下错误
TypeError: this.config is not a function
at json (/node_modules/thinkjs/lib/extend/context.js:94:22)
at Tracer.run (node_modules/think-trace/lib/…
-
## DESC
希望增加获取所有cache的方法,或者增加key的前缀匹配获取
原由: 在做更新操作时,可以根据前缀匹配来删除query时的缓存,
## ENV
Platform:
Node.js Version:
ThinkJS Version: