-
如果我在修改源文件,然后thinkjs对这个文件开始 compiling
如果源文件中有定时器,那么编译后的定时器还是会执行的,也就是说好像node进程并没有重启,所有所有的定时器都会保存下来?
ThinkJS Version:2.2.x
-
集群有多个host怎么配置呢?
-
-- Configuring incomplete, errors occurred!
See also "/root/ships/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".
ERR! OMG Process terminated: 1
npm WARN optional SKIPPING OPTIONAL DEP…
-
## DESC
访问这个地址看下 https://thinkjs.org/zh-cn/doc/3.0/controller.html#toc-7d3
内容如下:
```
controller.action(controller, name, m)
controller {String|Object} 控制器名称
name {String} Action 名称
m {String}…
-
## DESC
还在使用2.2的版本,payload的消息类型上来是json结构的,如何在logic里头验证,目前使用指定value的形式,怎样设置才可以使用框架自带的快捷验证方式。
```javascript
indexAction() {
let rules = {
ucode: {
req…
-
## DESC
是否支持类似如下的代码布局:
src/server (后台代码,通过babel生成到app/)
src/xxx (前台代码,通过babel生成到 www/xxx.js)
## ENV
thinkjs2.0
Platform:
Node.js Version:
ThinkJS Version:
-
## DESC
有没有办法使用 mongodb 的原生方法呢?使用 model.find() 只能返回一条,model.select() 才返回多条,查询用 model.where ,实在感觉怪,太关系型了。另外 model.aggregate 的返回结果也不是很理解:
```
this.model.aggregate({
$project: {
'_id': 0,
…
-
1. 请教下ThinkJS对RESTFul的支持力度如何呢?
2. 请问下路由中的路径参数如何定义?
3. 如何获取路径参数呢?
-
## DESC
需要在模板文件中判断,选中当前链接,故需要知道当前路由是哪个,查看文档,未发现有此类方法。
目前的思路,是写一个公共的class 然后在 __before方法中获取到当前路由,然后通过 assgin方法,传递给VIEWS层,请问是否方法可以在 __before中获取到当前的路由,或者可以在VIEWS层直接判断当前路由,谢谢。
## ENV
Platform:
…
-
## DESC
这个问题大概在一年前我发现并解决过,现象为连接8小时候报错:
This socket is closed.
定位文件为 adapter/socket/postgresql.js
当时是因为判断依据错误。当时判断依据为
```javascript
if(err.message === 'This socket is closed.'){
```
事实上应该采用…