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.

9 votes
2 answers
311 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 ...
404 Name Not Found's user avatar
8 votes
2 answers
257 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 ...
404 Name Not Found's user avatar
1 vote
0 answers
26 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 ...
LitWaffle's user avatar
4 votes
0 answers
73 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 ...
Sajomancer's user avatar
3 votes
1 answer
231 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 ...
Cannabijoy's user avatar
3 votes
1 answer
49 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. ...
chovy's user avatar
  • 209
0 votes
0 answers
35 views

is it better to import data from json file instead of api calls in React Js?

I used different way to load data from wordpress-rest-api for frontend-reactjs as following : built simple services by node js to communicate with wp rest api and save response into json file in ...
FZDEV's user avatar
  • 9
2 votes
0 answers
45 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 ...
lincolnadym's user avatar
2 votes
1 answer
46 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 ...
Will Calderwood's user avatar
1 vote
1 answer
79 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 ...
Fpasquer's user avatar
  • 113
0 votes
0 answers
50 views

How can I make the webRTC and signaling feature code production ready?

I am learning webRTC and tried to implement signaling service through websockets. I am still a beginner in backend development so not sure how correct my code is. Can you please review it and let me ...
Aamir's user avatar
  • 9
2 votes
0 answers
95 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, ...
Andrew Cheong's user avatar
1 vote
0 answers
43 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 ...
Dinesh Basnet's user avatar
0 votes
1 answer
53 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 ...
Aaron Goldsmith's user avatar
3 votes
1 answer
117 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 ...
user avatar

15 30 50 per page
1
2 3 4 5
62