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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
253 views

I'm working on making a text adventure using Electron. I have the basics of the engine working, you can walk around an infinite map. Maps contain things, and you can enter a few basic commands. I'm ...
Julian Lachniet's user avatar
1 vote
1 answer
2k views

I am trying to re-organise my mp3 collection based on its id3 meta data into folders based on the artist. I'm new to nodeJs and more importantly promises. I was hoping I could get some feedback on my ...
James's user avatar
  • 197
2 votes
0 answers
58 views

This is not a question related to a bug.I've just created a very tiny node.js/express API for education purposes. I've created a very little ...
Christian LSANGOLA's user avatar
3 votes
1 answer
103 views

My code checks if a new subbed episode of a TV show is out by checking the designated blog. The blogs url returns a json which is then parsed for episode number, direct video link, embed video link, ...
logicallyanime's user avatar
1 vote
1 answer
306 views

Background info To learn a new branch of my dev career, I've started a new project in my spare time (I've never used WebSockets before and I also want to learn more about common authentication flows). ...
htmn's user avatar
  • 208
3 votes
1 answer
121 views

This is an online implementation of a game: Compatibility. You can find the rules here. The idea is to have a browser that perform all the game's mechanics and to discuss with your friends through a ...
Pierre's user avatar
  • 275
2 votes
1 answer
412 views

Simple code for getting documents that have a creationDate between two values in mongodb. If the user provides only one of the values the code should still work and ...
ATheCoder's user avatar
  • 123
4 votes
1 answer
198 views

My express.js application uses a lot of promises for interacting with a variety of services. Instead of including try/catch with each one, I've setup a fail safe factory method for all my express ...
Josh's user avatar
  • 143
3 votes
2 answers
2k views

Below is a (very) simplified version of a function I made that creates multiple REST requests to gather needed information. Things to note: One of the REST calls is dependent upon the output of ...
Scotty Jamison's user avatar
7 votes
2 answers
1k views

I had an interview task which was the final stage, however, the feedback I got back for my solution was that it lacked effort and structure. I would be grateful to ...
user6248190's user avatar
8 votes
1 answer
271 views

What I want to do is for an example command have it defined in its own file - e.g. command.js - and the same for the other methods. I want to make a separate file for every module - for example "...
roboJS's user avatar
  • 131
3 votes
1 answer
106 views

I had an interview task where I had to output customers who live 100km within a particular latitude and longitude and then output them to a file with their username and ID. The customer file looks ...
user6248190's user avatar
2 votes
1 answer
91 views

If i have a object like following ...
Saurabh Kumar's user avatar
9 votes
1 answer
471 views

So I wrote a rather primitive login logic in Node.js, which authenticates the user and handles JWT. Is it any good in terms of security, efficiency, building, async/sync, logging. SECURITY is my main ...
Munchkin's user avatar
  • 205
6 votes
1 answer
660 views

router/article.js ...
viviet's user avatar
  • 63
5 votes
1 answer
817 views

I am new to node.js, ajax, and asynchronous code. I’ve pieced together a working way to exchange json between browser and server and am wondering if someone with more experience considers the approach ...
Jim Thompson's user avatar
4 votes
2 answers
414 views

I created a class to scrape URLS, parse and validate emails and get internal links. How can I achieve the SOLID principles in this class written in Javascript to make a web scraper? ...
biel sala's user avatar
7 votes
3 answers
315 views

I'm slurping up fields from an API that returns an array of fields. Each field in the array is a String that actually contains two separate fields (a number and a date). The number is enclosed in ...
user2402616's user avatar
2 votes
1 answer
2k views

I have this working code, but sendAndReceive function looks ugly/smelly to me. Eslint complains about using await inside a loop, and using ...
heltonbiker's user avatar
1 vote
1 answer
94 views

So, I have been recently heavily focusing on Front-End, for data validation, showing errors etc. And a big thank you to CertainPerformance for many reviews hes done for me :) I have created a Report ...
DeveloperLV's user avatar
3 votes
1 answer
99 views

I've created a Node.js package that retrieves data from Icinga (a monitoring platform), formats it and passes it off to a class that generates some HTML and then sends it all out as an email. The ...
Arran Scott's user avatar
4 votes
1 answer
138 views

The following code is a Node-based Netlify plugin to generate Content-Security-Policy rules based on inline styles and scripts. Inputs ...
marcellothearcane's user avatar
2 votes
0 answers
37 views

I built an auction site with a dynamic caching layer after I seeing how expensive a dbaas is. The site is now done, but like any site that grows, my caching solution grew too. The cache currently ...
user6680's user avatar
  • 121
3 votes
2 answers
443 views

I'm working on a data analytics dashboard in Node.js as a portfolio piece. I've built a pipeline that gets the data where it needs to be for more processing, however, I feel the below code can be ...
BBirdsell's user avatar
  • 235
1 vote
1 answer
177 views

I'm practicing back-end programming and NodeJS. As an exercise, I'm attempting to build a REST API for a MongoDB collection. I'm also learning to use the Express and Mongoose middle-wares, so that's ...
NPN328's user avatar
  • 791
4 votes
1 answer
589 views

I would like to find the best way to access function variables that are being used as parameters in other functions in another module. The parsefile.js is a Node.js ...
jacobcan118's user avatar
3 votes
2 answers
808 views

Goal: Currently creating an application using Node JS and Handlebars. I have a to do list set up in ...
DeveloperLV's user avatar
2 votes
1 answer
149 views

I recently interviewed for a backend developer role at a startup involved in financial products, as a 2020 grad. The take-home assignment they had me submit had a few basic goals and they recommended ...
Utkarsh Pant's user avatar
3 votes
2 answers
3k views

I offer same day shipping if the user places an order before 9AM ET. If they place the order after 9AM, same day shipping is unavailable. My server is using UTC time so I need to check if the time is ...
Junky's user avatar
  • 163
2 votes
0 answers
81 views

I am writing an Express.js middleware function in a TypeScript NodeJS project that uses a function from a third-party module to perform a small workload. When writing unit tests, I want to mock this ...
Patrick's user avatar
  • 263
2 votes
0 answers
53 views

I am writing a lambda function to make a request and fetch data from API. I am using as a class based approach which I think could refactor it and write in correct way. May be we can change this class ...
user662539's user avatar
8 votes
2 answers
424 views

In order to learn web server programming in Node and JavaScript, I decided to implement a simple web server that only does one thing: Display data of the HTTP request as an HTML table. The actual ...
NPN328's user avatar
  • 791
5 votes
1 answer
164 views

I have a block of code that is re-used and I want to use functional programming to remove this duplication. My code takes an array of items, splits the items into batches of 500 and then does some ...
MSOACC's user avatar
  • 211
2 votes
1 answer
215 views

Here is my revised code from my other review question Node JS delete multiple MySQL linked records and delete physical file Just would like to hear some reviews if I have the right logic. ...
DeveloperLV's user avatar
2 votes
0 answers
680 views

This is in a node and express API. I'm trying to figure out the best way to handle Promises that resolve, but return a 404 response. I have a method which uses node-fetch to make a POST call to update ...
FlameDra's user avatar
  • 151
2 votes
1 answer
114 views

I wrote a discord bot that listens for links to the d20pfsrd rulebook in discord chat, checks if they are feats or magic, and then scrapes the page, formats it, and spits it back into chat as ...
jasonmadesomething's user avatar
4 votes
2 answers
233 views

To practice the very basics of node back-end, I'm implementing the most basic server possible for static content, using only the core node modules: http fs path With the following server ...
NPN328's user avatar
  • 791
3 votes
1 answer
1k views

I have the following tables in MySQL: ...
DeveloperLV's user avatar
7 votes
2 answers
375 views

I have to implement some business logic that will round a number (typically a double) upwards. Given that this number comes from a third-party and I don't know how they come to calculate it I'm ...
HexedAgain's user avatar
6 votes
1 answer
933 views

I use the following code which works as expected. The code uses open ID connect to login user. Because I'm pretty new to node and express, it will be great if I can ...
Beno Odr's user avatar
  • 119
4 votes
1 answer
300 views

I have been trying to do a simple query and return the results with node-mysql however I had several problems. Originally I wrote it where there was no promise, but ...
Ian's user avatar
  • 141
2 votes
2 answers
4k views

I am new in NodeJS and I try to write code based on tutorials I find online. I have a NodeJS app (based on Strapi) and an external API from a Cloud Servers provider. The process I follow is as: Call ...
Tasos's user avatar
  • 159
3 votes
1 answer
433 views

The following code should return an array (flatFeatures) which will include feature.name and the most far subscription.expDate. for example if I have some subscriptions with the same features, the ...
Omtechguy's user avatar
  • 161
6 votes
1 answer
92 views

I'm currently building an application using Passport and bcrypt for user authentication. I've created the registration part. Is there anything I could improve on? I'm still getting the hang of writing ...
imnewhere's user avatar
3 votes
1 answer
73 views

Improved version of the original question I've created a simple npm module and CLI program to get the latest GitHub and Bitbucket release from their APIs using Node.js. Please tell me if there's ...
user avatar
9 votes
1 answer
92 views

Solved, question with improved code I've created a simple npm module and CLI program to get the latest GitHub and Bitbucket release from their APIs using Node.js. Please tell me if there's anything to ...
user avatar
3 votes
1 answer
137 views

Goal: I have thought of a project to create and came up with this goal of: "To record temperatures for different Fridges or Freezers." Current situation I have a working method to get data ...
DeveloperLV's user avatar
2 votes
1 answer
425 views

This is my /forums page ...
DeveloperLV's user avatar
3 votes
0 answers
311 views

I've done my best to contrive an example of the problem I'm trying to simplify. I have a pool of workers, and each worker can do several tasks at a time. Each task takes an unspecified amount of time. ...
Trevor's user avatar
  • 31
2 votes
0 answers
70 views

I built this code as part of a test project that was given to me by a company. They had given me a .csv file that contained over 9000 records and wanted me to build a program that would upload it to ...
HonorableTones's user avatar

1 2
3
4 5
19