background preloader

NodeJS

Facebook Twitter

UglifyJS. Kue. Kue is a feature rich priority job queue for node.js backed by redis. A key feature of Kue is its clean user-interface for viewing and managing queued, active, failed, and completed jobs. At any point in the job's life-time you can view verbose details, including the job's arbitrary data, creation, update, failure, and completion times. Jobs may incrementally update their progress, providing vital feedback for long-running tasks. Job-specific logging allows you to see how your job's are progressing, or any hiccups they may encounter. With Kue you can schedule jobs to run at any time in the future, a simple yet powerful feature, showing you in real-time when the job will be scheduled.

With the UI's action panel you can filter jobs by type and alter sorting at any time. Socket.IO. Express. Emailjs. Node.js. Mongoose. First be sure you have MongoDB and Node.js installed. Next install Mongoose from the command line using npm: $ npm install mongoose Now say we like fuzzy kittens and want to record every kitten we ever meet in MongoDB. The first thing we need to do is include mongoose in our project and open a connection to the test database on our locally running instance of MongoDB. var mongoose = require('mongoose'); mongoose.connect(' We have a pending connection to the test database running on localhost. Var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); db.once('open', function (callback) { }); Once our connection opens, our callback will be called.

With Mongoose, everything is derived from a Schema. So far so good. Var Kitten = mongoose.model('Kitten', kittySchema) A model is a class with which we construct documents. Kittens can meow, so let's take a look at how to add "speak" functionality to our documents: Congratulations. Mongoose ODM v3.4.0. Ursa. Nowjs.