-
如题,thinkjs中如何调用solr客户端脚本
solr包地址:https://github.com/lbdremy/solr-node-client
var solr = require('solr-client');
// Create a client
var client = solr.createClient();
// Add a new document
…
-
## DESC
### ENV
OS Platform:
Node.js Version:
10.15.3
ThinkJS Version:
3.2
### code
```js
// your code here
```
### error message
F5 之后不能访问服务
```
// your error message here
``…
-
await this.model.where({xx: 'xx'}).update(data);
本来是update 操作, 会生成select 语句
-
按教程部署到SAE,测试接口发现获取对应商品报404,/api/goods/list等其他接口正常,/api/goods/goods?id=xxx报错。
`
logic deprecated logic's __after method is deprecated, it will be discarded in the next version node_modules/koa-compos…
-
我需要在子进程工作之前做一些初始化操作,所以需要在worker.js里增加一些初始化相关的代码,比如存取数据库,这肯定用到了异步,这就导致了一个问题,我无法保证那些异步的逻辑能按时执行,比如我重启了一下网站,我预想的是所有初始化操作完成以后,网站才开始服务,但现在的情况是,我worker里的异步代码还没执行,controller或者计划任务就可能先被执行了。
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
// your code here
```
### error message
```
// your error message here
```
### more descrip…
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
this.model('Task').where({
Task_num:['IN', list2]
}).select();
```
### error messag…
-
这个interval是等待handle执行完以后开始计算,还是开始执行handle的时候计算?
如果是等待handle执行完以后开始计算,那我的handle是一个控制器的action方法,返回的是promise,有什么办法能等待这个promise完成以后再开始计算interval呢?
-
## DESC
thinkjs 3.2.10 在unbuntu上新建项目启动报错
### ENV
OS Platform: unbuntu
Node.js Version: node.js 6.10.0
ThinkJS Version: 3.2.10
### code
用 thinkjs new demo 命令生成的项目无法运行报以下错误
```js
// yo…
-
## DESC
在Thinkjs项目中引入了Mocha进行单元测试。例如对Model的某个方法进行测试,但是启动后提示`think is not defined`。全部错误如下:
```
(function (exports, require, module, __filename, __dirname) { module.exports = class extends think.Mode…