Over the past month I’ve been learning a lot about Lua scripting on a Redis server. While scripting is great, there are a few things which are a bit painfull on the interaction layer between Redis and Lua. One of those things are tables and bulk replies. With the following post I will provide you with four functions that deal with Redis bulk replies and Lua tables/dictionaries.
In node.js, you are often confronted with streams that you may want to send and recieve data over. The following post provides and explains a small helper function that allows you to extract newline-separated messages from a node.js stream.
When first confronted with node.js, you are not only presented with a completely new programming environment. You also encounter what is often referred to as callback hell accompanied by weird unfamiliar programming patterns. One of these is the way node treats callback functions.
The following post explains the conventions that node.js uses for its callback patterns (referred to as Continuation-passing style) and how you should implement them in order to comply.
Given the following problem: You have an express based webserver and you have stored all your routes in seperate files in one folder, perhaps even organized into several subfolders. You now want an easy way to apply all routes with as little effort as possible..
Meet node-walker: This little module let’s you crawl a subfolder and perform a callback on each filename that it encounters, including files in subdirectories.
Use node-walker to recursively walk over a directory and all its files. You can then iterate over all filenames to i.e. require them all one after the other. Can be installed through npm as well: npm install node-walker
Earlier I wrote a little tutorial on how to get started with node.js on windows, which I now want to continue by explaining how to setup and use MongoDB with node.js in a Windows environment. This tutorial will cover:
- Brief introduction to MongoDB
- Installation and setup of a MongoDB database server.
- Connecting to MongoDB using node and node-mongodb-native
- Basic database operations through node
The following tutorial will give you a very brief guide on how to get started with node.js on Windows. This tutorial will not tell you which third-party tools to use, this is just a plain introduction to the node.js ecosystem. This includes:
- Install and setup node.js on windows.
- Run a “Hello world!”-program.
- Create a webserver program.
- Use npm to install a module.