Questions tagged [sails-hook]

Node.js module for Sails.js framework

A hook is a Node.js module that adds functionality to the Sails.js core. Hooks allow Sails.js code to be shared between apps and developers without having to modify the framework.

9 questions
6
votes
1 answer

Sails hook passport

I'm trying to implement Passport strategies into a sails hook, like this I can share on multiple project. When I try to log I have this error : Error: passport.initialize() middleware not in use at IncomingMessage.req.login.req.logIn…
jaumard
  • 8,202
  • 3
  • 40
  • 63
2
votes
1 answer

How to document an endpoint with 2 path parameters using sails-hook-actions2-swagger?

I'm using @logisticinfotech/sails-hook-actions2-swagger to document my REST API. My endpoint looks like this: / user /: uid / company /: cid. After generating the documentation, the company crashes between two IDs, which makes the endpoint look like…
henry123
  • 17
  • 2
1
vote
2 answers

Can't get sails-hook-validate to work with Sails v1.0?

I am having an issue getting validation error messages to attach to the error object in sails v1.0. I am using the sails-hook-validate module. User model: module.exports = { attributes: { name: { type: 'string', required:…
Lucas
  • 23
  • 4
1
vote
0 answers

What is the proper way to provide default configuration options in sails.js hooks?

I'm working on a sails hook (project hook). I want to make it configurable and need a way to provide default values. I couldn't find information on the sails hooks documentation. Here is an example hook: // api/hooks/customHook.js module.exports =…
nstCactus
  • 5,141
  • 2
  • 30
  • 41
0
votes
3 answers

Sails.js - Mailgun API base URL for EU domains

I am currently using Sails.js v1.1 and the issue I am facing is that my email domain is an EU domain. Currently there is no way to set the host parameter (* 'host' - the mailgun host (default: 'api.mailgun.net')) for mailgun-js via…
Numant Santz
  • 170
  • 1
  • 11
0
votes
1 answer

Only run my sails.js hook on `sails lift`, not `sails run`

I have a custom sails.js hook which implements a Websocket server (we can't use the built-in socket.js hook because we needed to match an old API). I also have a custom sails run script that does background processing. Right now, when the sails run…
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
0
votes
1 answer

mocha test for sails hook that depends on a sails app

I'm trying to write a mocha test for a sails installable hook (myhook) that is dependent on a particular sails app (myapp). I'd like the bootstrap.test.js to lift myapp with myhook. Thus, I have myapp a devDependency in myhook project. My…
eyn
  • 778
  • 2
  • 10
  • 21
0
votes
1 answer

Mongoose Sailsjs Schema hasn't been registered for model when populating

I'm trying to get mongoose working with sailsjs using this hook https://github.com/mikermcneil/sails-hook-orm-mongoose which work fine until I try to populate, when I get the error MissingSchemaError: Schema hasn't been registered for…
dottodot
  • 1,479
  • 1
  • 16
  • 24
0
votes
1 answer

Sails.js WebScoket how to create new channel?

How to create new channel for emit in SAILS.js? simple io.sockets.in('ee').emit('messageName', {thisIs: 'theMessage'}); and then in Angular.js io.socket.on("ee", function(data){ console.log(data); }) don`t work..