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.
919 questions
-3
votes
0
answers
41
views
Websocket integration for High frequency trading [closed]
I’m currently building a trading platform that requires streaming real-time price updates to the UI. I’ve implemented a WebSocket gateway and added handling for common issues such as:
Ghost/...
1
vote
0
answers
29
views
SvelteKit authentication hook with token refresh and request deduplication
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 ...
9
votes
2
answers
356
views
Simple Node.js version manager v2
As a followup to my previous version, I decided to try make this more cross-platform. I considered several languages: C++ is pretty cross platform, Rust is gaining popularity (and the language used by ...
5
votes
0
answers
104
views
Correct abstractions/organisation of a NodeJS GraphQL API
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 ...
8
votes
2
answers
303
views
Simple Node.js version manager
On Arch Linux, there are 2 packages that provide the Rust toolchain: rust itself and rustup. When users try to install a package ...
0
votes
0
answers
8
views
SafeDelete for Mongodb plugin
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 ...
2
votes
1
answer
70
views
NodeJS discord bot that starts systemd services
I am writing a discord bot that can start and stop my minecraft server. It currently works, but I am still learning NodeJS and I could use some tips on how to optimize my code.
Calling a command will ...
3
votes
1
answer
258
views
A home server template to securely access personal apps
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 ...
3
votes
1
answer
73
views
My surrealdb (1.x) migration script
I'm working on a migration script for surrealdb (currently working with 1.x).
Please review and let me know what I should improve.
...
1
vote
1
answer
132
views
Extract each occurrence from an array of objects
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 ...
1
vote
1
answer
63
views
Databases, dependency injection and static methods
I'm working on a Next.js app and looking at the best way to structure database access. With Next.js and web based apps in general, there are lots of different "server actions", aka, API ...
2
votes
0
answers
60
views
Redact specific elements from JSON (for logging)
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 ...
3
votes
1
answer
138
views
Consuming sharded database using node.js
I think the only big improvement that can be made is to check which shard to query based on the userIds of the followed users. One easy way is to check the last ...
2
votes
0
answers
108
views
To-do app with TypeScript backend (violations of TS best practices or unidiomatic code)
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, ...
10
votes
2
answers
336
views
JSON4 parser in Typescript
Context
I may have accidentally gotten a little sidetracked during homeschooling, and wrote a JSON4 parser in Typescript during the down-time. This project started as an idea that I got while ...