All Questions
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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, ...
1
vote
0
answers
57
views
Refactor Node.js Logging Library for Improved Readability
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 ...
1
vote
1
answer
78
views
Updating class method to use data from new weather API endpoint while keeping same return value object structure as with old endpoint
I needed to update a class in Node.js that parses the response from a new weather API endpoint but still preserves the same object structure and key values from having been using the old weather API ...