Middleware in Express applications

If you have recently moved or are thinking of moving to the nodejs Express framework than you should primarily get acquainted with its routing and middleware concepts, as an Express application is essentially a series of middleware function calls. Middlewares in Express are functions executed after the incoming request from the client, the middleware then processes the request depending on its purpose and then hands over the request to the next middleware in the chain or generates a output if is the last one in the chain, terminating the request-response cycle.
(more…)

Read More

How to open various desktop applications from nodejs

The most commonly opened resources in a program are files, urls and database connections. he ‘Opn’ package allows you to open stuff like websites, files, executables in their respective desktop applications. The package is cross-platform.

I usually use the package during testing phase – opening various resources, mostly images and text files after execution of a program.
(more…)

Read More

Fuzzy string matching in NodeJS

String matching is an integral part of any programming language. Many times, however, one requires to get a fuzzy instead of an exact match between strings. Usually in search applications the same word may be spelled differently – which if we do an exact math will return empty results. Fuzzy matching allows you to search for ‘nearby’ strings to a candidate string.
(more…)

Read More