-
## DESC
### ENV
OS Platform: Win 10 版本1803 内部版本17134.407
Node.js Version: v10.15.3
ThinkJS Version: 3.2.10
### code
```js
work.js:
// invoked in worker
think.beforeStartServer(asy…
-
请教下thinkjs里如何支持ejs的母版页配置呢
-
同标题
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
// your code here
```
### error message
```
// your error message here
```
### more descrip…
-
## DESC
看到application提供一个cli运行模式。
cli模式使用还是很有必要的,例如提供一个一次性运行工具(例如数据库迁移等等)
```js
runInCli(argv) {
think.app.emit('appReady');
return mockHttp({
url: argv.path,
method: 'CL…
-
## DESC
做轮子,
为了节省代码, 比如, model扩展统一的前置添加数据,统一的前置更新等等, 想过直接继承think.model, 然后再model目录下model文件继承自定义的扩展, 可是有一个问题, 比如model目录下,admin.js, 继承了customModel,customModel继承think.model, 可如果,admin.js和customMo…
-
## DESC
think-mysql 升级到 1.4.0 线上经常卡死,
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
// your code here
```
### error message
```
// your error mess…
-
## DESC
think-session中
使用file存储session,方法:this.session(name, undefined, options),设置options为:{cookie:'6e8c865e-7433-4b96-bf1b-c741e5ed91ae'}, 不能生效,不能切换session文件。
场景:在非当前session中,希望通过事先存储的cookie的i…
-
## DESC
```js
let schema = this.schema;
if (!(schema instanceof mongoose.Schema)) {
schema = new mongoose.Schema(schema);
}
const model = connection.model(this.tableName, s…
-
## DESC
还考虑着要不要使用think-redis插件,一看源码,就写死五个可以操作的方法。
redis功能很强大,不可能只有增删改查的。
后来看一下,还好类有导出ioredis实例.。
我建议插件的readme.md还是补充一下该插件引用了ioredis,
顺道补多一个返回实例的方法,demo里面至少告诉开发者,
更多redis使用方法请参考ioredis。
目前我看来,th…