Questions tagged [node.js]
Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine.
511 questions
1
vote
1
answer
241
views
How should I handle routine health checks in a Node.js/Nest.js application?
I have a Nest.js application, and lately I've been thinking about how I can ensure that data is synchronized between two sources - my database and an external database.
For example - and to my ...
3
votes
1
answer
253
views
How to design a plugin architecture in Node.js?
I have a Node.js application and I want users to be able to develop custom plugins. I have multiple ideas and I am unsure how good they are. I need some tips from more experienced developers.
My first ...
3
votes
3
answers
1k
views
Is a SPA still a SPA if SSR is used?
I’m developing a system with separate front-end and back-end components:
The back-end is already implemented with Node.js and Express, exposing REST APIs.
The front-end must be a private SPA, ...
0
votes
2
answers
112
views
Should I instantiate controllers in route modules or use static methods?
I’m building a modular REST API using Node.js + Express + TypeScript.
My controllers are defined as classes. In my route files, I currently create a new controller instance, like this:
import { Router ...
6
votes
2
answers
37k
views
Understanding Front End vs Back End Javascript?
I've been noticing lately, as I've played around with Javascript, HTML5, and Node.js for the first time, that Javascript seems to be a language that is used very differently (and with different syntax)...
1
vote
1
answer
199
views
Storing 100k keys for bulk retrieval from Azure
We're setting up a device-to-cloud channel using TLS-PSK (Pre-Shared Key), where each device uses a unique key to encrypt communications.
Each key is known only to the individual device that uses it ...
0
votes
1
answer
534
views
Should you use nested routes within NestJS for a "RESTfull" API
Here is an Example API for managing companies, employees, and their children. My entity relationships are as follows:
company -1:n-> employees -1:n-> children
I’ve structured the API routes ...
5
votes
4
answers
730
views
Is this too much for a modular monolith system? [closed]
A little background before I ask my questions. I've designed a system as an architect based on the requirements given to me by the client. The client has a team or two to three developers which are ...
4
votes
1
answer
600
views
How to ease the pain of lack of diffs when using database migrations?
The pain that I've often felt when creating database migration files, is best described in this Speakerdeck: Sane Database Change Management with Sqitch.
Paste entire function to new "up" script
...
3
votes
3
answers
496
views
Is it a good idea to wrap node.js package functions in a micro-service architecture?
Our development team works with a micro-service node.js architecture. This means we work with a very large amount of repositories that currently each take care of their own dependencies.
To avoid ...
1
vote
3
answers
354
views
Where to handle Validation Errors in Business logic layer?
I'm currently designing a multi-layered application and am trying to figure out the best practice for error handling within the Business Logic Layer (BLL).
Should I handle errors directly within the ...
5
votes
2
answers
4k
views
Node.js error handling through each layer
I am looking for a way to handle errors in a Node.js application without getting lots of log entries for the same error event, one from each each affected layer.
This might actually apply to any ...
0
votes
0
answers
104
views
Edge Case For Cookie Based Token Management
I have a React frontend and a Nodejs backend that uses authentication via an OIDC service provider. After a user goes through the SSO authentication flow I store the token (containing a refresh token ...
6
votes
3
answers
5k
views
Best practices for Docker image node version and .nvmrc
If I'm building microservices using Node on Docker images - it's necessary to keep an idea of what version of Node I'm using.
The idea is - I'm going to be running Node locally in development - and ...
3
votes
3
answers
7k
views
Designing a Feed and Notification system in MongoDB
I'm developing a NodeJS API that will be consumed, for now, by an Android app.
I need 2 important things here: a News Feed and a Notification system. And I need it to be scalable.
I'm using ...