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.
861
questions
0
votes
1
answer
16
views
How to add a new service on top of an existing path
I'm trying to build a service whose path I wanted to extend from an existing path. Here's my scenario. I have one service called instances which has, among others, the path /instances/<id>/ ...
-1
votes
1
answer
40
views
Fetching data from API and saving them into Database
I have MS SQL database and I'm using FeathersJS 5 as backend .... I'm little bit confused, because I cant get expected results... I'm fetching data from microsoft and then I want to save them into my ...
0
votes
0
answers
18
views
additional special query in TypeBox feathersjs not working correctly
I use feathersjs v 5.0.8 with TypeBox for mongoDB schema. In my schema I have a nested json object after which I'm doing finding data. I added additional special query to schema in this way:
[
...
0
votes
0
answers
12
views
How do I specify the login_hint in FeatherJS OAuth?
After setting up OAuth in FeathersJS to authenticate with Microsoft, it all works fine. What I can't get working is passing the login_hint through to Microsoft.
When I put it in the config file (&...
0
votes
1
answer
31
views
How to load initial data in a Database table in feathers.js
Here's a problem I'm banging my head around since months now:
I'm searching for an elegant,consistent way to initialize a table, the first time it is created, whithin feathers-knex
I'm using feathers....
0
votes
1
answer
29
views
Relations in FeathersJS 5 + MongoDB
I ran into a problem again. I'm trying to convert my Express backend to FeathersJS, but I can make schemas relations work.
This is my job.schema.js
// For more information about this file see ...
0
votes
0
answers
79
views
Using FeathersJS typebox schema how do I specify a conditionally required field?
I am writing my first feathersjs application and I do not know how to specify a conditionally required field in the feathers schema (which is based on ajv and typebox). Basically, I have an '...
0
votes
1
answer
41
views
How to create node service with feathersjs and redis 4?
I'm new to node/express and trying to create a service that will use redis. So far only this key is in redis:
testkey: "Hello, Redis!"
I've set up this service (src/services/redis/redis....
0
votes
1
answer
31
views
Create a query between two timestamps in feathersjs
How do I create a query in feathersjs where I can find all the rows between two timestamps. I am using mysql as the database.
This is what I have so far:
const moment = require("moment");
.....
0
votes
0
answers
62
views
How to use build authenticated router with feathersjs , adminjs and mongoose?
I am trying to use adminjs's build authenticated router with feathers express and mongoose but I just can't.
import AdminJS from 'adminjs';
import {Mongoose} from 'mongoose';
import AdminJSMongoose ...
1
vote
1
answer
56
views
How to make recursive associations with Feathers.JS?
I'm trying to make recursive associations with Feathers.JS but keep running into issues that make it seem like it's not possible. I want users to be associated with other users via a foreign key ...
1
vote
1
answer
27
views
WebSockets not working if nodeProcessCountPerApplication is set to anything else than 1
We have a nodeJS express app using feathers und we use websockets hosted on Windows Server with iisnode.
If we set nodeProcessCountPerApplication to 1 everything works fine.
If we set it to 2 or zero ...
0
votes
1
answer
49
views
Aggregate Sorting in FeatherJS before hook for get request
I need help on how to aggregate sorting for a get request.
Aim
I want to build a web API with FeatherJS and MongoDD. The web api will have the following sample dataset for food menu item (see below).
...
0
votes
1
answer
60
views
feathers.js V5 How to check if user is loggedin without using authenticate hook
How to check if a user is logged in Feathers,it seems only when using the authenticate hook will user be populated in the context params. is there a way to check on a non-restricted path like in the ...
1
vote
0
answers
144
views
API documentation on Swagger-UI
I am trying to document only the POST method for one of my services. Issue is Feathers-Swagger keeps adding all the other methods even if I specify create only . Here is the code
` // Swagger Docs
...
0
votes
1
answer
35
views
Add custom saved params on featherjs
Im noobs use FeatherJS and I stuck on roles and permissions management in FeatherJS
I have tables contains users, users_role, and roles. Table roles have relationship with two permissions table. I ...
0
votes
0
answers
57
views
Feathersjs GeneralError: The "config.server" property is required and must be of type string
I created a new feathersjs app with npm create feathers@pre vdb-b.
"feathers": {
"language": "ts",
"packager": "npm",
"database&...
0
votes
0
answers
65
views
Feathersjs with tsconfig-path not working while running with ts-node-dev
"scripts": {
"dev": "ts-node-dev --no-notify -r tsconfig-paths/register src/index.ts",
},
Getting following error
[INFO] 12:12:54 ts-node-dev ver. 2.0.0 (using ts-...
0
votes
1
answer
84
views
FeathersJS API + Firebase Realtime Database
I would like to if there is way to use a Firebase Realtime Database with Sequelize on a FeathersJS API.
My API is setup with a local mariadb this way, in the sequelize.js:
const Sequelize = require('...
0
votes
1
answer
101
views
How to access the user object when it's in a feathers-sequelize many-to-many association?
I'm trying to build a hook that will restrict certain user actions to specified security roles. But I'm having trouble accessing the user record from a second hook, when the users model is associated ...
1
vote
0
answers
60
views
LEFT OUTER JOIN WITH WHERE CLAUSE MANY TO MANY IN SEQUELIZE
I have a many to many relationship between two tables players and sports. With a bridge table playerSports containing the foreign keys of playerId and sportId. I need to query all the sports for a ...
1
vote
1
answer
61
views
Await two Promises in feathersJS
// users.hooks.js
const userDeletion = require('../userdeletion/userDeletion');
const triggerUserDeletion = () => {
return async (context) => {
const userDeletionRes = userDeletion(...
0
votes
1
answer
45
views
protect user fields when returned via sequelize association
I'm having trouble figuring out how to exclude certain fields from the associated model from being returned in a query.
I've got a user-membership setup working, using a "users" model, which ...
0
votes
1
answer
444
views
How to upload a base64 encoded image and save to mysql database?
Currently, I am encoding images in a Vue.js application to base64 and save them in a MySQL database using feathers.js and feathers-objection. The data type in the table is LONGTEXT, which works fine ...
1
vote
0
answers
41
views
I can't send headers with feathersJS rest api /axios. What do I do wrong?
I have feathers API with REST/axios. Configured like this:
const axios = require("axios");
const restClient = rest(serverPaths.serverPath.slice(0, -1));
restApi.configure(restClient.axios(...
0
votes
1
answer
67
views
Feathersjs link or unlink existing account (accessToken) oauth login
Is there a way to link or unlink existing account (accessToken) oauth login to feathersjs
1
vote
1
answer
44
views
How to filter feathersjs service
How to filter feathers Js services to publish real-time just on Chanel
service.on('created', (message, context) => {
console.log('message created');
return app.channel(`conversation-${message....
1
vote
1
answer
87
views
Configure FeahtersJS with Sequelize ORM when using serverless
I'm trying to create a solution with FeathersJS and deploying it to AWS lambda function using serverless framework.
I used feathers generate app to create my application and choose sequelize as ORM to ...
0
votes
1
answer
227
views
Search for a string with spaces in sequelize for postgres
I am looking for a way to search for a string with spaces in postgres using sequelize.
I have a database named library with a books table. This has a title and author column in there.I have tried ...
0
votes
1
answer
260
views
Feathers js how to customize get service endpoint
So I want to attach a url to my user requests which is in another service. How to customize get request?
const { Service } = require('feathers-sequelize')
exports.Users = class Users extends Service {...
0
votes
1
answer
75
views
How to use google credentials to create a user in feathers js
how do I use google credentials to decode and get the data I need and use it to register a user?
Im using this component library: https://www.npmjs.com/package/@react-oauth/google which gives me the ...
0
votes
1
answer
382
views
Auto increment from a custom id in sequelize with feathers-js not working
I am trying to create a table that autoincrements starting from 1000.
Following this example, here's my code:
const Sequelize = require("sequelize");
const DataTypes = Sequelize.DataTypes;
...
1
vote
1
answer
850
views
How to fail a test if no error is thrown in jest.js?
i'm currently improving the branch/function coverage of our feathers.js/node.js api (testing with jest).
Currently there is a service with a property which should only accept certain values, which is ...
-1
votes
1
answer
241
views
feathers js: how to validate access token
So after authenticating I get an access token in which I store in browser session. My question is, in case user refreshes, how do I validate the token?
0
votes
1
answer
301
views
How to handle errors using `.catch` in promises
I want to continue code execution when my promises do not have errors, If there are any errors however, I do not want to proceed. How do I gracefully handle this case ?
Eg.
/* start of REST call */
...
1
vote
2
answers
131
views
Feathersjs logger and hooks
Using FeathersJS and Sequelize-MariaDB for this particular App.
The DB and Service seem OK from the basic FeathersCLI initialisation
We then remove the logger module and replace it with our in-house ...
0
votes
1
answer
158
views
FeathersJS cannot create user with ObjectionJS and SQLite
I am experimenting with FeathersJS. To do so, I generated a new feathers app
$ feathers g app with the following configuration:
? Do you want to use JavaScript or TypeScript? JavaScript
? Project name ...
1
vote
0
answers
214
views
Using VueJS + FeathersJS + Feathers-Vuex, getting this error: Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_0__.default is undefined
Here is the error:
Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_0__.default is undefined
<anonymous> index.js:7
js app.js:96
__webpack_require__ app.js:397
fn app.js:643
&...
0
votes
1
answer
60
views
feathersjs prevent find after every create
This feels like a daft question but searching just seems to pull up the featherjs docs. which I find incredibly difficult to make sense of until you understand everything and being a bit new to ...
0
votes
1
answer
409
views
How to use feathers with graphql?
I want to build graphql in feathers.
And try below method。
from index.js
/* eslint-disable no-console */
const logger = require('./logger');
const app = require('./app');
const port = app.get('port');...
0
votes
1
answer
237
views
Using Google Oauth in FeathersJs with an existing access token
How do I use the Google Oauth in featherjs with an existing access token? The docs do not give an example on this. The only example is through the browser as shown here.
When going through the browser,...
0
votes
0
answers
596
views
Recursively populate parent-child tree from MongoDB collection
I have a MongoDB database with a collection, using a mixture of Parent and Child References.
Each document in the collection includes two properties: parentId and childIds.
The parentId property is an ...
1
vote
1
answer
116
views
feathersjs application not starting on heroku
I have an application which I deploy via github actions to heroku.
But it won't start, respectively it doesn't find the compiled sources to start the app.
Unfortunately I'm new to heroku and I can't ...
0
votes
1
answer
119
views
How to prevent multiple validations with async requests?
I have a user's item that needs to be validated 10 times (variable value) by other users. And when the item is validated 10 times, the item's owner gets a number of points.
But my problem is, if 400 ...
2
votes
1
answer
531
views
Mongoose $inc with enum validation failed
I'm working with featherJs and mongoose.
I have a schema with an enum which I want to $inc.
new Schema({
status: { type: Number, enum: [0, 1, 2, 3], default: 0 },
});
But when I $inc the 'status' ...
2
votes
0
answers
765
views
How to refresh feathers.js token with next-auth and next.js setup
Whenever a user logins in successfully, this is a sample of the server response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9....
0
votes
1
answer
389
views
Feathersjs with Sequelize, updating the model
I'm able to create a new service which creates a table in the MySQL DB just fine, but the feathersJS model file simply creates 1 text field in the model by default,
when I modify the fields add more ...
0
votes
1
answer
1k
views
How To Group For Multiple Fields In Sequelize
I need one help related to the sequelize and I am using postgres.
I want to group records in sequelize. Also the form and user value comes after populate or using include method of sequelize.
I have ...
0
votes
2
answers
252
views
How to do a relatedQuery (many2many) with feathers-objection
Regarding to this post: https://stackoverflow.com/a/69903276/1547821
it shows an approach with less boilerplate, to prevent a users query output (GET) to only the user who is logged in.
But how to do ...
1
vote
1
answer
110
views
How to integrate auth step into feathers service
I'm trying to integrate jwt/local auth into any call to feathers. So by including user/pass in any call it authorizes, rather than requiring a individual previous call to the /authorization endpoint ...