![](/img/trans.png)
[英]How to test waterline models in Trails.js
我想用mocha測試我的Trails.js項目的模型。 我使用trailpack-waterline將我的模型加載到Waterline ORM中。 在Trails Docs之后我創建了一個User.test.js : 這沒有任何錯誤。 但我無法以任何方式實例化該模型。 按 ...
[英]How to test waterline models in Trails.js
我想用mocha測試我的Trails.js項目的模型。 我使用trailpack-waterline將我的模型加載到Waterline ORM中。 在Trails Docs之后我創建了一個User.test.js : 這沒有任何錯誤。 但我無法以任何方式實例化該模型。 按 ...
[英]Eslint Error while working with Trails js
我在測試之前使用Eslint來修改Trails.js項目的代碼。 Tails.js附帶現有的預配置eslint-config-trails 。 但是,當我測試我的代碼時,eslint會Definition for rule 'no-global-assign' was not found我的 ...
[英]GET request fails on a model with string 'id' if the 'id' begins with a number - Trailsjs
我有一個名為 Product 的模型,它有兩個字段 id 和 name。 我安裝了腳印。 當我使用郵遞員和 GET 請求localhost:3000/product?id=XX2525時,記錄器中生成的 sql 是 如果我對以數字localhost:3000/product?id=10XX2 ...
[英]How do I access the Sequelize model inside of the Trails model
我試圖獲得https://github.com/jarrodconnolly/sequelize-slugify在我的Trails設置中工作,但我看不到訪問由Seilsize在Trails模型中創建的模型的方法。 插件示例說我需要執行以下操作: 我注意到trail創建了一個Sequel ...
[英]Regex allow multiple work in a sentence
我正在嘗試使用正則表達式(javascript)解析以下句子: 我希望看電視 我想要一些巧克力 我需要火 目前我正在嘗試: I(\\b[a-zA-Z]*\\b){0,5}(TV|chocolate|fire)但它不起作用。 我也用\\w進行了一些測試,但沒有運 ...
[英]No Directive annotation found on TodoApp Server Rendering
我正在嘗試使用angular2-universal進行服務器渲染。 我復制粘貼官方repo https://github.com/angular/universal/tree/master/examples/src/universal/todo的示例todo應用程序到我自己的Trails / ...
[英]Why can't Node set up a named pipe server in a worker in Windows?
我正在努力在我正在開發的項目中啟用集群支持。 這個問題直接來自集群模塊上Nodejs文檔中的聲明: 來自: https : //nodejs.org/api/cluster.html#cluster_cluster 請注意,在Windows上,尚無法在工作程序中設置命名管道服 ...