Questions tagged [trailsjs]

A Modern Web Application Framework for Node.js

Trails is a modern Model-View-Controler Framework for Node.js

Repository : https://github.com/trailsjs/trails

7 questions
7
votes
1 answer

How to test waterline models in Trails.js

I wanted to test the models of my Trails.js project with mocha. I use the trailpack-waterline to load my models into the Waterline ORM. Following the Trails Docs I created a User.test.js: 'use strict' const assert =…
Lando-L
  • 843
  • 6
  • 19
7
votes
1 answer

Why can't Node set up a named pipe server in a worker in Windows?

I'm working on enabling cluster support in a project I'm working on. This question comes directly from a statement in the Nodejs docs on the cluster module: from: https://nodejs.org/api/cluster.html#cluster_cluster Please note that, on Windows, it…
Travis Webb
  • 14,688
  • 7
  • 55
  • 109
6
votes
1 answer

Eslint Error while working with Trails js

I am using Eslint to lint the code of my Trails.js project before testing it. Tails.js comes with existing pre-configurations eslint-config-trails. However, when I am testing my code eslint throws a Definition for rule 'no-global-assign' was not…
Lando-L
  • 843
  • 6
  • 19
3
votes
1 answer

How do I access the Sequelize model inside of the Trails model

I am trying to get https://github.com/jarrodconnolly/sequelize-slugify to work within my Trails setup, but I can't see a way of accessing the Model that is created by Sequelize inside of the Trails model. The plugin example says I need to do…
Andrew Smith
  • 1,224
  • 6
  • 9
3
votes
4 answers

Regex allow multiple work in a sentence

I'm trying to parse following sentences with regex (javascript) : I wish a TV I want some chocolate I need fire Currently I'm trying : I(\b[a-zA-Z]*\b){0,5}(TV|chocolate|fire) but it doesn't work. I also made some test with \w but no luck. I want…
jaumard
  • 8,202
  • 3
  • 40
  • 63
3
votes
1 answer

No Directive annotation found on TodoApp Server Rendering

I'm trying to do server rendering with angular2-universal. I copy paste the example todo app of the official repo https://github.com/angular/universal/tree/master/examples/src/universal/todo into my own Trails/Express server. I manage to start my…
jaumard
  • 8,202
  • 3
  • 40
  • 63
2
votes
1 answer

GET request fails on a model with string 'id' if the 'id' begins with a number - Trailsjs

I have a model called Product with two fields id and name. I have footprints installed. 'use strict' const Model = require('trails/model') /** * @module Product * @description TODO document Model */ module.exports = class Productextends Model…
Jay Killeen
  • 2,832
  • 6
  • 39
  • 66