85 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
0
answers
77
views
Lost OpenAPI descriptions when using recursive Zod schema transformation with zod-to-openapi
I'm using @asteasolutions/zod-to-openapi to generate OpenAPI documentation from Zod schemas. I have a recursive utility function makeSchemaDeepNullable that transforms all fields in a schema to ...
0
votes
0
answers
50
views
How to handle API responses with null values while maintaining strict input validation in TypeScript/Moleculer?
I'm building a microservice with Moleculer.js and TypeScript, using Zod v4 for schema validation. I need to validate API responses that return null for optional fields, while keeping strict validation ...
1
vote
0
answers
36
views
NATS in Kubernetes CrashLoopBackOff when setting --max_payload to increase message size
I’m running a NATS cluster in Kubernetes using a StatefulSet.
My use case: I have microservices built with Moleculer that sometimes return large responses. By default, NATS limits messages to 1MB, but ...
0
votes
1
answer
63
views
Moleculer micro service rooting not working in case of separate services rooting
when i try ti implement code like that it works:
gateway.service.ts
{
path: "/api",
whitelist: [ "**"],
use: [],
...
0
votes
1
answer
113
views
File upload service with moleculer
I have a service file, and I'm sending a file to the http://localhost:4000/uploads URL using the "file" field via POST in Postman. However, in my code, context.meta.$multipart is coming out ...
0
votes
1
answer
113
views
How to measure action response times in molecular.js
I have a backend written in molecular.js and I have multiple services. Now, I want to measure the action response times so I can know and optimize actions before going live. Any suggestions/comment ...
0
votes
0
answers
92
views
Refactor and upgrade old typescript code - moleculer service - property does not exist on type
We have a 5 years old nodejs source code which must be upgraded to the latest nodejs technology, packages, typescript compiler. We found a piece of code which uses the moleculer nodejs package, and a ...
1
vote
0
answers
78
views
Moleculer Framework- Download a file from MongoDB where the data is in binary format
I need to develop an API which when gets a GET response with an ID it should download a file where it is stored in MongoDB as a Binary buffer.
If I try to print the binary buffer to console.log it ...
0
votes
1
answer
604
views
Moleculer Framework API code is not able to use the file from request body (form-data). returns undefined
I am new to the Moleculer framework and need to upload a file from an API request body to MongoDB using an action handler. I have been able to upload files using Multer with Express, but I need to use ...
0
votes
2
answers
130
views
Selectively filter debug logs for Moleculer
I have healthcheck actions within my services that are called to determine whether the service is up. Due to the frequent calls from automated systems, there are a lot of noise in the debug logs. Is ...
0
votes
1
answer
106
views
When I test socketio in moleculer get `404 Not Found` error
I created a socketio demo as below:
services/socketiodemo.service.js
"use strict";
const ApiGateway = require("moleculer-web");
// require Socket.IO and Moleculer's Socket.IO ...
0
votes
1
answer
196
views
`this.adapter` is `undefined`. when execute the action in moleculer action
I have created a moleculer project as below:
https://codesandbox.io/s/8d5xy3
now I changed default database to mongodb/mongoose:
but when I run products.service.js's action: createProduct, I get 500 ...
2
votes
1
answer
296
views
I cannot run up the docker compose of moleculer demo with error `Service name can't be empty!`
I follow this moleculer tutorial:
When I execute the 7th step:
7. We create docker-compose.yml and define our services in it:
and run it up.
I get issue, I cannot start up the other three containers:...
1
vote
1
answer
107
views
How to resolve populate with different field instead of _id in MoleculerJS
I am creating a service to query Tasks collection from the MongoDB. It have a custom id field called uId, and a task store other uId of other taks in its field named subtask. I want to populate the ...
0
votes
1
answer
93
views
MolecularJS :: Correlation details :: how to pass logged in user to action method
I am new to molecular Js, can someone please help me in understanding ,how to pass the context of current request in action handlers?
to be more specific, In authenticate method of API gateway I am ...