Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
13 views

Is it node js express or nestJs fastify better to use concurrency, scalling, performance, large data fetching and saving side? [closed]

give me advantages and disadvantages with the result previously used POC's mainly i'm facing issue concurrency and scalabitity issue with large number of data. so i need to select proper framework to ...
uda123's user avatar
  • 55
0 votes
0 answers
11 views

How can I set bodylimit according to mutations in graphql & redwood & fastify?

I am trying to set the bodylimit according to the mutations in Redwoodjs. I want to set different bodyLimit due to different file sizes. I tried to use @fastify/multipart with graphql in server.ts but ...
Esra Budak's user avatar
0 votes
0 answers
15 views

No way to add a 'before hook' custom filter depending on an array in AdminJS

What's the problem? I want to add a before hook on the list action that can pre filter my list of records depending on an array. In the following example I want to pre filter the list of users ...
charles_r's user avatar
0 votes
0 answers
30 views

Convert a schema (@sinclair/typebox) that is in a decorator to type

I'm currently working on a Fastify overlay that I'd like to make, the goal is to develop decorators to create routes quickly. I know fastify-decorators exists, I've been working with it for a long ...
RealDragonMA's user avatar
0 votes
0 answers
24 views

Cannot curl to docker chainguard node server using fastify at http://[::1]:80

I have set up a docker container from chainguard running a node server with fastify. The docker container shows as running: Server listening at http://[::1]:80 Process id: 7 When I go to localhost I ...
Steve Tomlin's user avatar
  • 3,709
4 votes
1 answer
49 views

Firebase Authentication not working with ADC (Application Default Credentials)

I am using Firebase Admin SDK from my development machine (Node.js/Fastify). So I am trying to do something like this: Initialize Firebase App 👇: import * as firebaseAdmin from 'firebase-admin' ...
rrcabrera9625's user avatar
2 votes
1 answer
35 views

Fastify Swagger not managing enumerators as expected

We are working on a backend with Fastify, declaring schemas with Typebox and generating OpenApi definitions with Fastify Swagger We are facing some problems with enums or similar during docs ...
SamDroid's user avatar
  • 643
0 votes
0 answers
62 views

NestJS how to use Sesion with RedisStore using Fastify?

I have installed NestJS v.10.3.9, Fastify v.4.28.0, @fastify/secure-session v7.5.1 and @fastify/redis v6.2.0 because I need pernament session to save tokens (id tokens/refresh tokens) to protect ...
ChicaDevCat's user avatar
2 votes
1 answer
44 views

Control nodejs stream data through multiple streams

I am building a fastify server to upload/download files to s3, when I want to download a file I am able to get it using a node stream and return it, so I prevent loading the whole file in memory, I ...
F. Maida's user avatar
0 votes
0 answers
46 views

Nestjs with fastify adapter broken on v10

I updated nestjs to the v10, and tried to implement fastify adapter but it throws 200+ types errors inside the node_modules/fastify/types Versions: "@nestjs/common": "^10.3.10", &...
Nedim Bajric's user avatar
0 votes
0 answers
35 views

I want to add a basic auth to access swagger url in nestjs application

I am trying to add an @fastify/basic-auth and try to intercept the route to ask for username and password. But it is not working. Adding my main ts file: import { AppModule } from './app/app.module' ...
Aditya Vyas's user avatar
0 votes
0 answers
32 views

Have an issue with types when creating a Fastify plugin to decorate mongoose models using Zod

I have created a Fastify plugin to decorate Mongoose models, adding them to the Fastify interface: declare module 'fastify' { export interface FastifyInstance { models: { [key: ...
Gihan Rangana's user avatar
1 vote
1 answer
136 views

Error: unable to get local issuer certificate when using AWS RDS Proxy

I am trying to connect to an RDS Proxy endpoint (Proxy is connected to an RDS MySQL instance) with my node server running on Amazon Linux 2023 EC2 instance. The node server is using the Fastify ...
nmd19's user avatar
  • 11
1 vote
0 answers
59 views

How can I correctly return an AWS SdkStream in Node.js + Fastify?

After retrieving a file from an S3 bucket using the getObjectCommand from my NodeJs with Fastify backend, I am trying to return the Body of type SdkStream in the response. However, the response does ...
Geeogee's user avatar
  • 61
0 votes
1 answer
20 views

How do i validate a duplicate email input using knex?

I'm building an app with node.js knex.js typescript zod and fastify, im trying to validate the emails so that when an email is inserted on the user registration, if it is a duplicate it throws status ...
Lucas Faria's user avatar
0 votes
1 answer
29 views

BuildFastify makes Google Cloud Function not to see the function name

I am uploading my nodejs source code via Cloud Build which uses gcloud function command. This function has failed to deploy and will not work correctly. The error I get is: Function 'myFunction' is ...
Marcin Kulik's user avatar
0 votes
0 answers
37 views

Fastify CORS error when running firebase emulator locally

I am experiencing some cors error while using fastify and firebase emulator locally: signin:1 Access to fetch at 'http://127.0.0.1:5001/<redacted>/asia-southeast1/hello/api/v1/session_login' ...
cornstar94's user avatar
1 vote
1 answer
117 views

Fastify decorate not registering middleware

I am trying to create middleware to check the JWT that is passed through on route calls. I have followed the JWT middleware guide and converted the code to typescript as its all in vanilla JS. I am ...
cw23's user avatar
  • 65
1 vote
1 answer
156 views

Swagger UI Not Displaying Routes in Fastify with Dynamic Mode

Fastify Swagger isn't displaying any of my routes in the Swagger UI, even though the routes are working fine when accessed directly. I'm using Fastify with the @fastify/swagger plugin in dynamic mode, ...
aCodeOrNot's user avatar
0 votes
1 answer
91 views

Using an async preHandler function on @fastify/http-proxy creates a FastifyError: Reply was already sent

I have the current code for proxying. const fastify = require('fastify')({ logger: true }) const fastifyHttpProxy = require('@fastify/http-proxy') fastify.register(fastifyHttpProxy, { upstream: ...,...
Richard's user avatar
  • 7,389
0 votes
1 answer
91 views

How to convert TypeScript Interfaces and Types to JSON for Fastify Interoperability

I am new to Fastify and I do not want to write JSON schema objects from scratch, but leverage TypeScript Interfaces and Types exposed from an existing Data Access Controller. How can I convert those ...
Chris's user avatar
  • 471
0 votes
0 answers
22 views

fastify throw 404 to assets using @fastify/express

I have a cdn bucket ( named and mapped as domain cdn.example.com ). I am using fastify to serve the content. The GCS bucket has multiple folders and lets say the folder I want to serve is app1 which ...
Ajay k's user avatar
  • 181
0 votes
0 answers
111 views

How to specify which JWT SECRET to use to create a JWT and verify a JWT with Fastify?

I'm building an API using Fastify and fastify/jwt and I'm having trouble specifying which secret I'm going to use to create and verify a JWT. I have two different JWT's: "refresh-token" and &...
Ícaro Cedraz's user avatar
0 votes
0 answers
103 views

serving file via fastify works on localhost but not on specific ip address (only chrome)

I have set up a fastify server which is supposed to serve files from a redis server. I have set up the server like so: const fastify = Fastify({ logger: { transport: { target: '...
pcace's user avatar
  • 560
0 votes
1 answer
42 views

2Hire Webhook URL Not Working in Express.js After Conversion from Fastify

I recently converted a Fastify application handling 2Hire webhooks to Express.js. However, the webhook URL isn't triggering as I expected. 2Hire webhooks Subscription API Doc: https://developer.2hire....
Internazionaleauto's user avatar
0 votes
1 answer
66 views

how to access url in fastify nodejs

i am trying access parts of the url from a fastify server. the url looks like this for example: http://localhost:3001/query_tile/10/544/336 in the fastify server i need the values for z/x/y. i am ...
pcace's user avatar
  • 560
1 vote
0 answers
43 views

Fastify schema not inferred in request.query

I new to and trying out Fastify with Typescript. I am unable to figure out why the name in the const {name} = req.query section is throwing a type error: Property 'name' does not exist on type '...
cornstar94's user avatar
0 votes
1 answer
166 views

fastify/sessions cant implement my own session store using Prisma

I use typescript. I want to implement a session based authentication system. So, Ive decided to use fastify/session. And Prisma for storing the sessions. My problem is when I request to "/" ...
Kaan's user avatar
  • 1
1 vote
1 answer
53 views

How to validate all properties of a schema using fluent-json-schema?

I want to be able to validate all the properties in a schema, but I'm getting an error which only contains one missing property not all of them. I have the following schema: const headersSchema = S....
Anthony Luzquiños's user avatar
1 vote
1 answer
157 views

Route duplication error with Nest.js and Fastify

I'm using Nest.js + Fastify Adapter. I'm implementing a BatchController class and a create method. The class takes the annotation @Controller('batch') and the method takes the annotation @Post('create'...
MARCOS FELIPE BARBOSA DE CARVA's user avatar
0 votes
1 answer
52 views

Access to fetch at 'http://localhost:4000/graphql' from origin 'http://localhost:3000' has been blocked by CORS policy

app.register(fastifyCors, { origin: 'http://localhost:3000', methods: "GET,HEAD,PUT,PATCH,POST,DELETE", }); This is my CORS configuration for my fastify and graphql-helix server code. ...
user24915920's user avatar
0 votes
0 answers
134 views

Can't set cookie with Fastify

Can't set cookies on Next client with Fastify backend. I have a Next.JS client and a Fastify backend. I made this simple endpoint that sets an httpOnly cookie server.get("/set-cookie", async ...
Alexandru Toma's user avatar
0 votes
0 answers
83 views

Fastify web framework not supporting multiple middleware - NodeJS

I have created one middleware for found the duplicate for all field and all model dynamically based on arguments Now I try to validate 1st field its working find when I try array type in preHandler ...
Koperumsozhan VR's user avatar
2 votes
1 answer
122 views

Fastify Error: Access to XMLHttpRequest at api-dev.example.com from origin dev.example.com has been blocked by CORS policy

I have a Node.js(v20.10.0) backend server using Fastify(v4.26.2) as the framework. I have index.js as an entry point. import Fastify, { FastifyInstance, FastifyServerOptions } from 'fastify'; import ...
Not A Bot's user avatar
  • 2,654
0 votes
0 answers
65 views

FastifyError: fastify-plugin: fastify-accepts - expected '3.x' fastify version, '4.18.0' is installed

This is happening when i'm trying to upgrade node version to 20 Node.js version v20.12.2 Operating system macOS "dependencies":{ "@fastify/cookie": "8.2.0", "...
Muditha's user avatar
  • 193
1 vote
0 answers
372 views

Implementing Drizzle ORM as a Fastify plugin in TypeScript

I'm trying to integrate Drizzle ORM into my Fastify application as a plugin using TypeScript. Despite following the provided documentation and examples, I'm encountering issues accessing the Drizzle ...
Nazar Duma's user avatar
1 vote
0 answers
160 views

TypeScript Error: Property 'config' does not exist on type 'FastifyInstance'

I have created an environment plugin to load data from a .env file and another plugin to handle cookies in my Fastify application. However, when I try to use the environment configuration in the ...
Nazar Duma's user avatar
0 votes
0 answers
38 views

Fail to run a Fastify/ts app compiled from typescript: ''TypeError: Cannot destructure property 'Serializer' of 'dependencies' as it is undefined.''

I develop an app with node.js Fastify framework (typescript, ES syntax). I decided to transpile files to CommonJS syntax to avoid incompatibilities in node environment. The app compiles from ...
Toto's user avatar
  • 43
0 votes
1 answer
158 views

Postgres auto_explain module does not provide a plan for node-postgres queries

I am trying to optimize queries from my fastify(node) backend, using the auto_explain module provided by PostgreSQL 10. However, no query information is being generated for queries coming in through ...
b_dev6's user avatar
  • 25
0 votes
0 answers
32 views

Fail to run a Fastify/ts app bundled by Webpack: "TypeError: Cannot destructure property 'Serializer' of 'dependencies' as it is undefined."

I develop an app with node.js Fastify framework (typescript, ES syntax). I use Webpack to bundle the app and to compile typescript. I want to compile to commonjs to prevent compatibility issues. The ...
Toto's user avatar
  • 43
1 vote
0 answers
45 views

stop fastify from stripping out null values in json response: is that configurable/programmable?

If inside my route handler, I return a json object like this: return { items: findItemById(idParam) } it works fine, as long as findItemById() actually finds something. When it doesn't, I'm ...
yen's user avatar
  • 2,150
0 votes
1 answer
47 views

fastify routes do not resolve to variables (req.params empty)

i am trying to ge a small fastify (typescript and nodejs) server running. fastify.get('/query_tile/:z/:x/:y', async (req, reply) => { const t0 = performance.now() const { z, x, y }: { z: ...
pcace's user avatar
  • 560
0 votes
0 answers
54 views

Catching connection timeout error seemingly arbitrarily

I'm using Postgres on my (now) Nodejs server. During development, I don't run into any issues. However, whenever I create a production or preview build, some requests fail with a timeout error. On ...
Mike K's user avatar
  • 6,313
0 votes
1 answer
134 views

Trouble using Handlebars partials (nestjs + Fastify)

I'm trying to replace static content in my project with templates using Handlebars. The name of my project is ready-to-read, so I have the following file structure: ready-to-read -public -src -views --...
D Bystrov's user avatar
0 votes
1 answer
82 views

'require is not defined' error when I try to run bundle.mjs created by webpack

I develop an app with node.js Fastify framework (typescript, ES syntax). I use Webpack to bundle the app and to compile typescript. The app bundles successfully, but when I try to run the resulting ...
Toto's user avatar
  • 43
0 votes
0 answers
29 views

'require is not defined' error when I try to run bundle.mjs creaated by webpack

I develop an app with node.js Fastify framework (typescript, ES-modules).In my app, I use Webpack to bundle the app and to compile typescript. The app bundles successfully, but when I try to run the ...
Toto's user avatar
  • 43
0 votes
0 answers
53 views

using handlebars to display data from a returned promise

I am trying to display data in my template that is returned from an api fetch. I'm using Node with Fastify. The code I am using to send to the handlebars helper from my template is: value="{{...
Dennis's user avatar
  • 1,156
0 votes
1 answer
142 views

Fastify schema: return all validation errors

I'm trying to return all fields names which have not passed validation, because I need them to display the respective error messages under each input field on the frontend. But I haven't found a way ...
cs.edoardo's user avatar
0 votes
1 answer
153 views

CORS header ‘Access-Control-Allow-Origin’ missing. Status code: 404 (fastify-oauth2 + react)

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource a github oauth api using fastify-oauth2 from react Giving the error below: Cross-Origin Request Blocked: The ...
VinayManala's user avatar
1 vote
0 answers
56 views

Uploaded Media being Cut / snapped (image) or Reduced Duration (video)

I have a storage service "Bunny" where I can upload my media, I'm facing a weird issue when I upload high-resolution images or videos and try to fetch the image or video I get back images ...
SebMaz's user avatar
  • 578

1
2 3 4 5
17