A list of puns related to "Node.js"
This happened to me a few times before. Somehow when our client's engineers heard we are using Rails, they will enter a 'frenzy' mode, and start attacking our decision of choosing Ruby on Rails as our development tool.
Mostly they will start by saying Rails is so old nobody is using it anymore. Then they will go on and say Node.js outperforms Rails by 10 times. Finally they will say something something and the magical word concurrency.
I know none of these are true (the performance part is true, but you know), and Node and Rails each has different use for different case. But out of curiosity, how do you deal with this kind of 'attack'? For me I just politely ask them to look on the Internet for answers, because I know nothing I say would change their mind.
And one more final question: why are some Node people hating Rails people?
Basically, i want to see how we structure node js api. Preferably with mongo db. I want to see what do we put in service, contollers or routes, maybe add some logging as well.
It could a tutorial (like article or video) or public repo i can learn from
thanks in advance :)
Any recommendations for great node.js bloggers who write content at a senior level? Stuff that is well-written, with a lot of examples and explanations. I'm finding it a bit tricky to find them.
I'm 27 m based in Switzerland. My background is in business and economics but I wanted to learn coding for many years and have now decided that it is the right time to commit to it.
I'm highly interested in cryptocurrencies and would ultimately love to learn solidity but for now, I will stick to javascript.
Before I was trying to build my own startup, we did a physical consumer product but ultimately ran out of money. That experience taught me that I love to build beautiful products/tools.
It would be nice to form a small group that eventually has regular zoom calls to discuss each other's coding questions. But we could just get started by having a nice group chat. My experience so far is that once you have 200 people in a chat, it becomes less and less useful as nobody feels accountable for other people's problems. So I'd like to limit the group to maybe 10 people.
If you're interested just leave a brief comment introducing yourself and I'll open a discord server or so.
Would be nice!
Hi! I'm in charge of a node.js webserver mostly written by me. The app exposes an API that mostly reads from a Postgres database. Everything is running on Node.js v8.11.3 on Windows Server 2012 R2 using iisnode on an AWS EC2 m5.8xlarge instance. Today I detected a weird issue, out of a sudden the API started replying with HTTP 500 errors randomly on all endpoints, there were no deployments to the app at that time, the database didn't have any abnormal load, the CPU, memory, disk and network usage were also normal when comparing them to previous days. I used Log Parser Studio to go through the IIS logs and discovered a few things:
As I said, this happened out of a sudden without any hardware or software changes. After I restarted the app on IIS it just went back to normal. I have no idea why this happened. A few months ago something similar happened, we started getting random HTTP 500 errors (the issue was aggravated when the app was under heavy load) but the requests were returning in under 200 ms (not like now that they finish after 2 minutes). While investigating I came across this, suggesting I should set server.keepAliveTimeout = 0, indeed, that solved the issue completely, even under heavy load no HTTP 500 errors were returned, awesome! But now, this happened, I don't know if it's related in any way. Here is a graph I made with Log Parse Studio, each column is 10 minutes.
The app uses express and connects to a Postgres database through typeorm. Here is the web.config for the app in case that's useful. Has anybody experienced something similar or have any clues about what could have caused this? If you nee
... keep reading on reddit β‘For a while now I've been feeling the pain of working on Node.js applications that have their config values scattered across .env
files, hardcoded within application code, injected at runtime, etc.
This led me to start working on acklo - a tool for centralising where a Node.js app's config is stored and updated. I know I'm not the first to try solving this problem, but with acklo I've been focusing on some key areas to make it stand out:
While I've been dogfooding acklo it's helped me do things like:
info
to debug
instantly, without needing to restart its servers, which let me debug some weird behaviour I was seeing.At this stage acklo is in private beta (and it's free!). I'd love to get some more Node.js devs using it and giving me feedback while I continue building it out. If you're interested, check out:
Cheers!
I've heard of pg, knex, postgraphile, and a bunch of different orms.
Which ones do you guys use? I have been using an sqlite driver this whole time but I'm looking to transition to postgres. Not really looking for an orm, but something which is reliable.
Is there any tutorial or documentation on how to deploy a NextJS Server Side Rendering application inside Linux using Node.js and Nginx?
Hello, community! I'm having a question about Firestore. I have a Node.js script that writes an async queue, like this:
const data = []; // here I have an array with data
const ref = this.db.collection('my-data');
try {
const queue = data.map(async item => await ref.doc(item.id).set(item));
await Promise.all(queue);
} catch (e) {
console.log(e);
}
When I execute it with a small dataset of 20 items, it works fine. But when I run it with a dataset of 75K items, it fails always. This is the error: Failed to start HTTP/2 stream with error: The session has been destroyed
.
It seems like the issue is coming from the @grpc/grpc-js
package, but I have no other clue. Maybe you do? Big thanks in advance!
I am new to node js and i have been working on a project where i have to create an API to bulk insert data into the database. i am following a MCV structure, the below given code is working fine but it will only insert one record . how can i modify this so i can insert multiple record at once
module.exports.insertStudent = async (req, res, next) => {
let data = req.body;
let dataValues = {
id: data.id,
Name: data.Name,
};
Students.insert(dataValues, function (error, value) {
if (error) {
if (error.errno == 3006)
return res.status(400).json(responseMessages.commonResponse(responseMessages.DUPLICATE_RECORD, '', '', error.sqlMessage)); // Duplicate Record
else
return error;
}
dataValues.id = value.insertId
let response = responseMessages.commonResponse(responseMessages.SUCCESS, "", { 'inserted data': data });
return res.status(200).json(response);
});
}
With the Bullseye release coming very soon, I have upgraded a few systems to Bullseye, including servers and some of the headless work computers which are normally on 'stable'. This release cycle I did it much later than I usually do, because of my own unexpected workload. I was relieved by NVIDIA CUDA driver having no issues with the latest kernel: they used to lag behind, and that caused us issues in the past. It was the smoothest upgrade of the last three.
Browsing through the versions of main language toolchains and runtimes that are of interest to us, I was surprised to find that the installed node.js was LTS 12 (12.21.0, to be exact). According to the node.js release schedule, node.js 12 is the Maintenance LTS with EOL on 2022-04-30, and version 14 is the Active LTS with an extra year of support compared to v12, with EOL set to 2023-04-30.
While Debian has no fixed release schedule, the cadence has been the same for the last 16 years since Sarge: the Q2 of every odd year, give or take a month (this is why, IMO, Debian is the most reasonable production platform of those who self-support their OS, including us: stable, predictable, and frequently updatedΒΉ). Assuming no change, the next stable Debian after Bullseye may be reasonably expected roughly in 2023 Q2.
I'm wondering why the Debian JavaScript Maintainers decided in favor of the Maintenance release of node.js LTS, with only 10 months of its support life left in it, in favor of the Active LTS v14, which would be in maintenance to the next stable Debian, give or take a couple months.
And no, it's not hard to maintain multiple node.js runtimes or bundle a specific version to more critical services that are tested before release with the specific runtime; we in fact do both. My question is rather driven by curiosity. From this user's superficial look, v14 seems a better match in terms of its support lifetime. The release notes mention an upstream release timing EOL issue related to Rails, which sounds very similar to the node.js EOL timeline impedance mismatchβexcept v14 has long been available and supported, but still wasn't selected over the outgoing v12.
_______________
ΒΉ Most of our Sci/HPC fellows in the same boat have been quite affected by the post-CentOS7 uncertainty storm, while
... keep reading on reddit β‘I've been looking up Node courses to study (I want to become a backend developer). But all I see is people teaching Express and Mongo/mongoose. I get that it is important, but how good is it for getting a job? Is learning Node mainly learning the above-mentioned libraries or is there something I'm missing?
Hello, you absolute Legends!
I'm thinking of making a (relatively) quick browser MMO strategy.
I'm experienced with PHP, MySQL, HTML, and JS and have almost no experience with Node. Also, I'm looking into Godot, Unity, and Unreal Engine. I've had some experience with UE4 and specifically made a working multiplayer 3D prototype game in it.
The project scope, though can be hugely extended in the long run, initially is VERY small. I plan to focus on a single game mechanic. Though the key to the game is that real people play it. Think of a cross between Travian, cookie clicker, and agar.io. Mostly idle gameplay, with a map, some actions, and a chat.
Also, it doesn't require a lot of people for the proof of concept stage. About 10-20 active players should do the trick. That's why I think it's doable.
Also, I'd like to go mobile as soon as possible.
So, one plan I have is to build a shabby proof of concept on PHP-MYSQL-HTML-JS, where I'm comfortable, and if the core idea works, rebuild it with a team on a better-suited platform.
The other β try as I can to have the best foundation for future development and need some good recommendations for backend tech, frameworks, database, and such. The focus still would be on easy to implement for a single dev with some experience in web development.
TLDR: What's the best backend tech, DB, frontend, and frameworks for an MMO browser strategy? Focus on quick development.
Hi,
I am a frontend developer, I have been working professionally as such for about 3 years, as I am starting to get pretty comfortable with frontend, I want to start developing some skills in backend, and as it is still javascript, I guess node.js is the best choice.
I have created MERN stack app previously for university, but that was a bit less than 3 years ago. Right now, I want to learn more in depth.
Can anyone suggest where to start? I will be starting node.js course on udemy by Maximilian SchwarzmΓΌller, but want to know what people are using from node.js frameworks to what databases, to what tools? Where you host your node.js applications?
I know this is a lot of different thing in one post, but I want this to be discussion about what people use, why, why they don't use alternatives and so on, which would help a lot for me starting with node.js
Thanks!
--
I will update this thread with more questions as those will come up.
Whenever we think about developing a web app, Javascript is the only language that comes to the mind. As per the stack report, Javascript is a popular programming language for web app development because it is easy to learn and works well when combined with other languages and can be used to build various apps. But with the latest trends, market competition increases and businesses are looking for the tools, technologies andΒ frameworks that allow them to hold a tight grip on various operating platforms with a single solution. Many organizations find Node.js a perfect solution for server-side development to meet the continuous need for apps that can run seamlessly and carefully on all platforms. But working on a Node.js project is not simple. If you may have experienced the issues regarding speed. Here we discuss some tips that are known to speed up your Node.js web application development tremendously. So, letβs see each of them one by one.
Know the amazing new features of Node.js 16 at- Whatβs New In Node.js 16?
Since Node.js is designed with single thread architectures and asynchronous coding is heavily used in Node.js to ensure non-blocking operational flow. With the availability of various synchronous components, it would block the applications and show down the app performance. Asynchronous coding lets you use queues to monitor workflow, allowing you to append extra tasks and add additional callbacks without blocking the main thread. While you are using the Asynchronous methods, in some cases, it is feasible to find your web page making some blocking calls. Donβt worry! This is common when you use third-party modules. So, you need to keep an eye on libraries and try to avoid them dominating synchronous calls.
To deliver the HTML page for any dashboard, the node.js application needs to retrieve a lot of data for the dashboard. You need to make multiple internal API calls to fetch different data. When delivering the dashboard you may execute following hypothetical calls:
The user profile β getUserProfile().
The site list β getSiteList().
Subscriptions β getSubscriptions().
currnet site β getCurrentSite().
Notifications β getNotifica
... keep reading on reddit β‘Iβm looking for a ORM which is similar to Laravel Eloquent. I must say Laravel Eloquent makes it piece of cake to work with relational data. I tried knex, bookshelf, sequelize but none match to the level of Laravel eloquent.
Just like the title says, meet soketi/pws - a Node.js-written (C-based at the core) application that acts as a WebSocket server, being fully compatible with the Pusher protocol, both HTTP REST API and WebSocket.
It was made with the goal of having a local testing environment for Pusher or to run your own server (single-instance or at-scale) in case you don't have enough money for paid Pusher plans.
It's open-source, comes with Docker and Helm v3 support (for orchestration). The guys at uNetworking did a great job for building such fast C applications, and even porting them to Node.js.
Some misunderstanding is that you need Pusher for it to run - which is not needed. You define the apps in the server configuration and you are free to connect directly to the server:
const PusherJS = require('pusher-js');
let client = new PusherJS(key, {
wsHost: '127.0.0.1',
wsPort: 6001,
// wssPort: 6001,
forceTLS: false, // unless SSL is enabled
encrypted: true,
disableStats: true,
enabledTransports: ['ws', 'wss],
});
client.subscribe('chat-room').bind('message', (message) => {
//
});
Can anyone suggest some books on gRPC for Node js or any tutorials?
Hello,
I launched an Open Source deployment tool managed via Command-Line:
Long story short - I always found the environment setup to be the most annoying part of web development. If you ever installed WordPress you should understand why...
The most comfortable solution for my workflow would be some kind of CLI tool that lets me define the frontend + backend setup I need for a given project & deploys it right away so that I have a live preview of the project.
Along with my colleagues, we've built something like this, and to be honest - we're proud AF.
We've been using it for internal projects for some time and it made our work easier than ever.
A while ago we released an update that cleared most of the bugs and we're now trying to open this to the public - for usage & contribution.
But we have a problem.
We're not sure how useful would it be for anyone outside of our team.
That's why I need your help. I need your answers to the following questions:
Here is the full list of the current product features for your reference:
I. Backend + Frontend templates - currently you can compose your environment using the following technologies
II. Free hosting - you can deploy your project on a mdbgo.io domain & host it for free
III. Custom domains - you can add a custom domain to your project- also for free but you need to own a domain (you have to have access to the DNS records ofc.)
IV. SSL - you can add an SSL certificate to your domain (HTPPS)
V. FTP access - you can upload assets for your project using a simple FTP connection
VI. Database - you can access your database (SQL or noSQL)
VII. Git repository - you can integrate your project with a private Git repository with one click. You can add contributors to your project & you c
... keep reading on reddit β‘Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.