Questions tagged [feathers-service]
26 questions
0
votes
1 answer
What is class in feathersjs and how to implement
Am new to feathersjs am try to do local auth in feathers while creating the service under users.class.js file where there. i don't know what to implement there so kindly guide me with this
const { Service } =…

Kamalesh Sivaraj
- 61
- 9
0
votes
1 answer
Is there FeathersJs syntax for creating an endpoint with hooks in a single command?
I've found how to add hooks to an existing service:
app.use("/hello", { get: async () => "Hello World"});
app.service('/hello').hooks({
before: { create: someHookFn }
});
But I'm pretty sure this syntax can be improved, and I'm just failing to…

Seph Reed
- 8,797
- 11
- 60
- 125
0
votes
1 answer
How to search with jsonb operator "@>" in feathers.js/knex service
Using feathersJs/Knex and Postgresql.
The (simplified) SQL query is this:
SELECT * FROM projects WHERE team_members @> '{"members":[{"id": 1}]}';
How can I implement this request in feathers/knex service? Everything I tried throws a Bad Request…

SharpBCD
- 547
- 1
- 7
- 25
0
votes
1 answer
Show Correlation Id Using Winston in Feathersjs
I want to logging in FeathersJS using winston. But, I want to logging with "correlation id". I want to find how I should create the logger, I want to make just log with the message, not supply with correlation id. Here is an example.
log.info('Here…

Bervianto Leo Pratama
- 37
- 1
- 2
- 10
0
votes
0 answers
How to get an auto-generated FeathersJS service to store and retrieve JSON data?
After auto-generating a FeatherJS App and Service, I have used an HTTP POST to send JSON data to the service in the POST body, and I have tried to use GET requests to retrieve this data.
When I POST and GET the only data I see is the ID of a record…

Steve
- 61
- 1
- 2
- 5
0
votes
1 answer
How to setup and access internal services in hooks using FeathersJs
I want to use internally defined services in hooks added to public REST endpoints, is this possible?
By internally defined I'm referring to using the disallow hook from feathers-common-hooks.
app.service('/api/internal/helper').hooks( { before: {…

Mattias
- 167
- 1
- 2
- 10
0
votes
2 answers
Feathers custom service response works in console but getting empty array on API response
I have a custom service which fetches data from multiple mongoose models and creates an array using these data and gives back to API.
Everything works well.. I can console the new object-array 'result.rolePermissions'. you can see that in the code…

Rameez Rami
- 5,322
- 2
- 29
- 36
0
votes
1 answer
Why feathersjs mongoose service return different "total" in get() method?
I have simple mongoose service in my feathersjs app.
In my laptop (mongo 3.6.6) I make query to app and receive correct data:
in data I have 4 rows and total=4. It good. But if I make same query to my app on server (mongo 4) I receive different…

tolyan
- 809
- 3
- 10
- 27
0
votes
1 answer
Change primary key from "id" to "any_other_key"
How can I change primary key of RethinkDB after my rethinkdb feathers service is created?
I tried below code but it won't affect.
app.use('/messages', service({
id: 'user_id',
Model: db,
name: 'messages'
}));
Is there anything I missed?

Harsh Patel
- 6,334
- 10
- 40
- 73
0
votes
1 answer
Feathers custom service methods -- against the rules
The Feathers framework is designed to stick to the REST design, I know, but I think I have an edge case that is worthy of breaking the rules a bit. I want to make a music player API that allows programmatic access to the player controls via HTTP and…

Alex Wohlbruck
- 1,340
- 2
- 25
- 41
0
votes
1 answer
How to avoid service multiple time run in hook using feathers.js?
I'm facing problem in feathers service in feathers hook. Exactly the problem is i'm using feather service in feather hook and when i call service in hook it run multiple times so that memory issue is to be happen. my question is how to avoid service…

KARTHIKEYAN.A
- 18,210
- 6
- 124
- 133