Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

Nodejs Module Pattern And Caching

The question is about nodejs module pattern code structure. My goal is to initialise the module at one time and export the module using module.export so that, it's ...
Sreejith sreeji's user avatar
2 votes
0 answers
293 views

Undo/Redo implementation using Memento pattern Javascript

Relatively new to the Design patterns, Generally my works are writing function for the needs. But now i need to implement a undo redo functionality, so i just read about the different patterns which i ...
Sreejith sreeji's user avatar
2 votes
0 answers
628 views

Cron expression parser

Problem Write a command line application or script which parses a cron string and expands each field to show the times at which it will run. ~$ your-program "*/15 0 1,15 * 1-5 /usr/bin/find"...
CodeYogi's user avatar
  • 5,177
4 votes
2 answers
380 views

web scraper for emails and links

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

"Clean Architecture" design pattern with Node.JS and MongoDB

After some time poorly designing my web applications' backends (mixing database calls with the controller, etc.), I have decided to try the "Clean Architecture" approach. In this example I have a ...
kibe's user avatar
  • 277
1 vote
1 answer
261 views

Using Bluebird with fs to read a file within each of an (variable length) array of directories

I'm reading an array (of unknown length) of modules package.json files in order to extract the "style" property and store it in an array of its own: ...
1252748's user avatar
  • 177
2 votes
0 answers
67 views

Signing timestamped API queries

The following code should prove to offer sufficient security for public API so my main concern is about design flaws in process. It is meant to describe the process and eventually get included in ...
michelek's user avatar
  • 131
5 votes
1 answer
395 views

Creating an async consumable object in Node

Background I have a situation where I have fixed number of objects with their own routines that would need to be called with the same initial message. To accomplish this, I have a Factory that ...
theWanderer4865's user avatar
1 vote
1 answer
273 views

Is this factory method a good approach?

We are beginning to learn Node.js and we are not always sure if we do it the right way. We have a strong object oriented background so the adoption is not always easy. Right now we implemented a ...
tschoartschi's user avatar