Questions tagged [feathersjs]

Feathers is a library that extends Express with the ability to easily create shared RESTful web services and real-time APIs using SocketIO and other websocket libraries.

Feathers is a library that extends Express with the ability to easily create shared RESTful web services and real-time APIs using SocketIO and other websocket libraries.

Useful links

Related tags

859 questions
0
votes
0 answers

Why is socket.io.engine undefined?

I am using feathersjs and just upgraded to feathers-authentication-client using the migration guide. Parts of feathers-authentication-client contains socket.io.engine which is undefined and throws an error. This is my code and socket.io.engine…
MichelH
  • 385
  • 3
  • 16
0
votes
1 answer

Why is the FeathersJS auth hooks never invoked?

I have the following piece of code which sets up 4 hooks for my FeathersJS service: service.before({ all: [ auth.verifyToken(), auth.populateUser(), auth.restrictToAuthenticated(), myCustomHook() ]}); The last hook is…
Nikola Schou
  • 2,386
  • 3
  • 23
  • 47
0
votes
2 answers

http post inside .then()

I want to do a http post inside .then(). I've already it in many diferent ways...nothing worked I'm trying to create an user and do an http POST after the creation. 'use strict'; module.exports = function(app) { return function(req, res, next)…
Igor Martins
  • 2,015
  • 7
  • 36
  • 57
0
votes
1 answer

Adding info to log into a database in FeathersJS

I can't seem to find how to log into a database in my FeathersJS app. I would prefer to specify database info and login info in the service, but I just need it to work. In myApp/config/default.json there is the following line: "postgres":…
0
votes
1 answer

automatic login after signup

I'm trying to, after create an account, login the user automatcally. Need to redirect them to /auth/local/ send the user and password that he just created. This is my middleware/signup.js 'use strict'; module.exports = function(app) { return…
Igor Martins
  • 2,015
  • 7
  • 36
  • 57
0
votes
1 answer

How to inclusion a file to index.html with feathers.js?

I'm learning a feathers and I have a problem. I try to do file inclusion similar to switch of PHP. For example: /src/middleware/index.js 'use strict'; const handler = require('feathers-errors/handler'); const notFound =…
SeaDog
  • 645
  • 1
  • 9
  • 32
0
votes
1 answer

Feathers JS nested Routing or creating alternate services

The project I'm working on uses the feathers JS framework server side. Many of the services have hooks (or middleware) that make other calls and attach data before sending back to the client. If I have a new feature that needs to query a database…
Merrock
  • 51
  • 5
0
votes
1 answer

Getting service handle or mount point from Feathers hook

I want to implement an after-hook that replaces record IDs with globally unique IDs of the form {serviceName}:{id} (where id is a typical MySQL numerical ID). However I couldn't find a way to access serviceName or service mount point from hooks. Is…
Gui Prá
  • 5,559
  • 4
  • 34
  • 59
0
votes
2 answers

FeathersJS update trigger on create

I am trying to find the best way to update a value in another service after the creation of data, essentially how a trigger would work in a database context. For instance I have an objects: foo= { _id, barID, otherData } bar= { _id, …
David O
  • 1
  • 1
0
votes
1 answer

How to ProxyPass websocket requests to node app via apache config?

I have a node app built with FeathersJS running on my server, I'd like it to be behind apache, I'm trying to use the mod_proxy module in apache to accomplish this but I've run into issues. This is what my apache mod_proxy section looks…
William L.
  • 3,846
  • 9
  • 53
  • 72
0
votes
2 answers

Streaming response in Feathers

In Express, streaming responses are easy to implement since res is a stream object. Inside a Feathers custom service method, however, how can I stream something as a response?
Gui Prá
  • 5,559
  • 4
  • 34
  • 59
0
votes
1 answer

How can I make Feathers (Express-based API Framework) Return Error Responses

I've read the Feathers book, so I know that to create an error response I simply instantiate the appropriate feathers-errors class: import {BadRequest} from 'feathers-errors'; const errorResponse = new BadRequest(`foo`, `bar`); However, I'm having…
machineghost
  • 33,529
  • 30
  • 159
  • 234
0
votes
1 answer

Combine hooks with each other (hook in a hook)

Is it possible to make use of a hook like restrictToOwner in another hook? For example I want users to be able to update their own information in general only, but I also want them to have access to specific properties of other users. So if a…
tan
  • 51
  • 1
  • 8
0
votes
1 answer

Avoid some query fields from filtering results

When I make a GET request to a service with a query string as in /restaurants?includeData, by default includeData is used to filter the restaurants giving me zero results. How can I avoid this specific query field from being used in the filtering so…
gustavopch
  • 796
  • 9
  • 16
0
votes
2 answers

How to implement req/res interceptors

I try to implement Request/Response interceptors using feathers-client. The purpose is to add global meta-data to the request and strip the response body. Additional I want to use the response interceptor to implement a global error handler. I…
Psi
  • 474
  • 4
  • 14