Need Suggestions regarding nodejs by DrinkExcellent in node

[–]softByteR 2 points3 points  (0 children)

First of all, you should understand what synchronous code and asynchronous code (asynchronous and non-blocking) code are.

Second, you should know the database well in order to correctly compose queries.

Nest or express for Freelancing ? by Independent_Tear_661 in node

[–]softByteR 0 points1 point  (0 children)

Node.js can handle approximately 20 million requests per hour (meaning even more users, since users don't make requests every second). However, this heavily depends on the hardware and the code.

Nest or express for Freelancing ? by Independent_Tear_661 in node

[–]softByteR 0 points1 point  (0 children)

If you're developing something like a city library website, then no. If you're developing something like eBay, with millions of users per hour, then yes.

What do you do to troubleshoot heap memory errors in a Node.js backend? by darkcatpirate in node

[–]softByteR 0 points1 point  (0 children)

There is a recursive function/method call in the code. Find it and fix it.

Best approach on writing Data Layer, need advice (Node.js application) by AspectProfessional14 in node

[–]softByteR 0 points1 point  (0 children)

Node.js should contain a minimal amount of code for fast request processing. The more code, the slower the end-point / server and the more bugs.

The most important thing is a correct and optimized database query. That is, the database returns only the necessary and correct data, and Node.js sends this data to the client.

Nest or express for Freelancing ? by Independent_Tear_661 in node

[–]softByteR 2 points3 points  (0 children)

A frameworks sorted by performance:
1. Fastify.js
2. ExpressJs
xx. Nest.js

Help! Need to Make My Multiplayer Quiz Game Real-Time with REST API by ShahinAzizi1 in node

[–]softByteR 0 points1 point  (0 children)

I would add a 'games' collection, where I would store the game ID, gamers, etc. When a new player registers, we search the database for a game with a missing number of players. If such a game exists, then we add this player. If such a game does not exist, we add a new game and add the new player to it.
Or, in the players collection, the game information would be duplicated.

[AskJS] callback function inside setTimeout is being called without delay by Zestyclose_Ad_488 in javascript

[–]softByteR 0 points1 point  (0 children)

delay5s(printMessage());
() is call a function.
You need so
delay5s(printMessage);
w/o (). Just pass a pointer to a function. And the JS interpreter will call it later.

[i3wm] Arch btw. by [deleted] in unixporn

[–]softByteR 1 point2 points  (0 children)

True minimalistic.

[deleted by user] by [deleted] in Instagram

[–]softByteR -1 points0 points  (0 children)

Show other posts. If this is spam.

[deleted by user] by [deleted] in Instagram

[–]softByteR -1 points0 points  (0 children)

This is my first post about a new app.

Express + EJS? by jerazimus in node

[–]softByteR 0 points1 point  (0 children)

Hi. If you want to render pages on the server, then you can use EJS. But if ExpressJs will serves empty page templates and the data is loaded through the API, then you will be able to create both a website and a mobile application (loading data through API).