Skip to main content

All Questions

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

Learning asynchronous caching by implementing one

After implementing a serial CLOCK second-chance cache in C++ without having enough rope to shoot myself in the foot, decided to dive into Javascript through NodeJs and write an asynchronous one. I ...
huseyin tugrul buyukisik's user avatar
3 votes
2 answers
2k views

Send multiple REST requests at the same time. (node)

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
6 votes
1 answer
889 views

Nodejs async with express server

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
3 votes
1 answer
1k views

NodeJS executing multiple database queries using async library

I have a use case where I need to run multiple tasks in series. Each task is required to perform some database operations. In my code step_1, ...
Dakait's user avatar
  • 133
2 votes
0 answers
274 views

Node.js async task queue implementation

Here is an async task queue implementation. The idea is to reuse node.js standard library as much as possible. ...
kharandziuk's user avatar
4 votes
1 answer
395 views

Data encryption / decryption on Node.js

I've implemented my first data encryption / decryption methods on Node.js. Although it might look similar to hundreds of sample implementations available online, I'm curious to get a feedback. I'm ...
Mike's user avatar
  • 277
3 votes
0 answers
673 views

Example Multiple Async Await Calls Javascript

I need to make an unknown number of api calls, up to 5 max probably. But most samples I've seen show only a couple of async calls so are effectively hard coded to the number of calls being made. This ...
kanine's user avatar
  • 31
3 votes
0 answers
64 views

Node/Express authenticate Google email address

Trying to set up express server that will authenticate a user's Google email before proceeding. The code below works, but is there any way to make it more elegant? The whole ...
Dan G's user avatar
  • 31
1 vote
2 answers
113 views

Error handling for a simple 'fetch some data, then save the data' Node function

This is a fairly simple bit of code: ...
dwjohnston's user avatar
  • 1,348
3 votes
1 answer
2k views

Concurrent fire and forget async task queue

I had to do a lot of IO stuff on my server running Node JS where I did not really care about the result of the operations. The list of incoming tasks could be huge, so I had to limit the number of ...
Endauriel's user avatar
  • 153
3 votes
0 answers
35 views

Testing whether pages can be fetched from two ports

I have an endpoint in my API which does a port test on 4455 and 4456 once a client GET's it. This is accomplished by requesting two web pages. The result will respond to the client with a JSON object: ...
Harvey's user avatar
  • 131
2 votes
3 answers
862 views

Fetching user details, posts, and comments using promises in ExpressJS

I'm creating an API service in NodeJS using Express (version 4) Framework. Created an MVC architecture for the same (no views, only model, and controller as this is an API). Also, there are routes. ...
Smokey's user avatar
  • 23
3 votes
1 answer
4k views

Nested loop with synchronous and asynchronous behavior

The problem is as follows. I have an array of objects like so: ...
Priyath Gregory's user avatar
8 votes
3 answers
697 views

Node.js module using Promises (client for KeePassHttp)

This is my first Node module, as well as the first time using Promises in Javascript. It is a client for the KeePass plugin "KeePassHTTP" to expose passwords securely, which I am planning on using to ...
michoel's user avatar
  • 133
0 votes
1 answer
20k views

Synchronous loop with internal asynchronous calls

Below I've written a simple version of what I'm attempting to accomplish. I'm new to asynchronous functions, so it's difficult to wrap my head around this. My goal is to wait for the loop to finish ...
user3419168's user avatar

15 30 50 per page