Skip to main content

Questions tagged [node.js]

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.

Filter by
Sorted by
Tagged with
1 vote
0 answers
27 views

I've implemented a SvelteKit handleFetch hook that manages authentication for API requests with automatic token refresh. The API provides a 15-second grace period where a refresh token remains valid ...
tony's user avatar
  • 433
5 votes
0 answers
104 views

I recently did a quick take-home test for a potential job opportunity. It included building a GraphQL API with nodeJS. I am not an expert in node (mostly use Python at work) but I have used it for ...
Sajomancer's user avatar
0 votes
0 answers
8 views

Title: Code Review Request: Mongoose Soft Delete Plugin with Query & Aggregate Middleware Body: I’ve implemented a soft delete plugin for Mongoose to handle REST API data safely in a MENN stack ...
Owais Qureshi's user avatar
3 votes
1 answer
258 views

I have built a Node.js program called serverserver, and it creates a server that you can access remotely on your phone. When you start the program, it prompts you to visit your public IP address. You ...
Cannabijoy's user avatar
1 vote
1 answer
132 views

I have a huge list of 4k+ software products. My goal is simple. I have a list of products. Each of those products has a software value. I would like to extract each software occurrence and covert it ...
Fpasquer's user avatar
  • 113
2 votes
0 answers
60 views

We need to implement a simple redaction function to redact (set to undefined) certain JSON elements when logging the JSON. The requirements are: We can't modify the current JSON object, as that ...
lincolnadym's user avatar
2 votes
0 answers
108 views

The working code in full is here. It's a To-Do App with a TypeScript backend, written as practice for an upcoming 4-hour interview for a TypeScript backend role. My colleague and I would like to know, ...
Andrew Cheong's user avatar
1 vote
1 answer
3k views

I want to process a file chunk by chunk to prevent memory exhaustion. I need to consume the file using a read stream. When trying it, this implementation seems to work fine. I am asking your expert ...
Louis Coulet's user avatar
2 votes
2 answers
274 views

I am working on a MERN stack app that is a CRM with a couple of modules. Now when the user sends x request to the server to do a supposed action (such as delete something), the server first checks if ...
Syed M. Sannan's user avatar
1 vote
0 answers
57 views

I have a Node.js logging library that applies ANSI styling for text formatting. Currently, the code contains some redundancy and could be refactored for better readability. I'm particularly interested ...
Dinesh Basnet's user avatar
13 votes
1 answer
1k views

I have written a relatively small msgpack implementation in C++, with performance that is not too bad, so I decided to write a NAPI wrapper around it, but the performance is just horrible. I am ...
t348575's user avatar
  • 233
0 votes
1 answer
69 views

I am building a template engine for js and I need some help refactoring the code for fast and more efficient performance. If you can help modify or suggest some updates I'll be grateful. ...
ahmed qoreichi's user avatar
0 votes
1 answer
163 views

The website TryHackMe came up with a challenge that involves using HTTP requests to interface with REST APIs (here, task #14/day 9). The challenge basically involves querying a basic REST API to ...
Aleksey's user avatar
  • 173
2 votes
2 answers
1k views

I had just decided to learn JavaScript, so I wrote this program. I am sure you know what FizzBuzz is so I wouldn't describe it here. Console output: ...
Ξένη Γήινος's user avatar
5 votes
1 answer
95 views

I built a basic authentication system for a node application and I have some security concerns. The username and password the user enters when they log in are stored as plaintext using express-...
HDawG's user avatar
  • 53
2 votes
1 answer
200 views

Description This javascript code uses tmi.js to listen for chat messages in a Twitch chat and perform certain actions depending on their content. In the sample code ...
Patrick Christie's user avatar
7 votes
1 answer
634 views

I'm working on a project in which I have a backend in nodejs and from there I need to call external APIs, those APIs require authentication token which is valid for 15 minutes. So if response status ...
Abhay Sehgal's user avatar
0 votes
1 answer
63 views

I am refactoring an old project, made in Nodejs with Express, applying the MVC pattern, today it is a fairly simple project: handling of the FCM and Remote Config tools from Firebase. Would it be ...
JRR's user avatar
  • 39
0 votes
1 answer
624 views

I'm writing a Discord bot that sometimes requires a Minecraft account UUID to be looked up so this is the function (and MWE) I have written to do this. ...
Jake's user avatar
  • 131
2 votes
2 answers
2k views

This is my function to generate all possible unique combinations of positive numbers these have sum equal to N. For example: If the input is 4 The output should ...
Chau Giang's user avatar
1 vote
1 answer
253 views

The structure of the JSON is as such: Each parent record can have many DataGroups and each DataGroup can have many ...
Faahmed's user avatar
  • 113
4 votes
3 answers
367 views

I'm a back-end developer (in PHP and Python) and I use JavaScript mostly for DOM manipulation. Now I'm writing a chat app in Node.js and I'm not sure if my code is the cleanest. Here is how it works: ...
hretic's user avatar
  • 91
1 vote
2 answers
100 views

I need/want to extend created array instance, to add extra methods that i see as useful. class.labels.js ...
Marc's user avatar
  • 153
7 votes
3 answers
315 views

I'm slurping up fields from an API that returns an array of fields. Each field in the array is a String that actually contains two separate fields (a number and a date). The number is enclosed in ...
user2402616's user avatar
3 votes
2 answers
2k views

Below is a (very) simplified version of a function I made that creates multiple REST requests to gather needed information. Things to note: One of the REST calls is dependent upon the output of ...
Scotty Jamison's user avatar

1
2 3 4 5
19