Backbone and Express Forgery Protection (csrf)

août 12th, 2013

With no comments

I had a problem getting Node.js/Express playing nice with Backbone. It was not sending the csrf authenticity token embedded in the page when it sent create/update/delete requests, and Express was destroying the session when it detected the invalid request.

Read More

JQuery autocomplete search with Node.js and Mongoose

mars 13th, 2013

With 3 comments

I was striving to find for the most robust solution, for an autocomplete search field implemented with JQuery UI, on client side, and NodeJS on the server side. And after implementation’s tests, I discovered that NodeJS and Mongoose will provide a efficient solution. The client side, with JQuery, is the one configured out on their […]

Read More

Reverse proxy for Nodejs in production with Apache2, HAProxy and Monit

décembre 18th, 2012

With one comment

We’ve recently finish a small Web site (code named sirifacts.org) with nodejs and expressjs. Our goal with this project was to setup Apache and NodeJS together in a real production environment, on a Linux Debian box. In mostly Web application, Apache2 is serving PHP and static files on port 80, while Nodejs is serving on […]

Read More

How to Passport-local + Railway-passport – Nodejs

avril 11th, 2012

With no comments

Here is how to set up a common and traditional way, with Railwayjs and Passportjs, for websites to authenticate users via a site-specific user email protected by a password. Passport is an authentication middleware for Node.js. It use a comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more. Passportjs […]

Read More

How to File Uploads in CompoundJS with Express – NodeJS

mars 18th, 2012

With no comments

For those who do not already know CompoundJS, Compound is the Node.JS MVC framework based on ExpressJS, fully ExpressJS-compatible. It allows you to build web applications in a similar manner as in Ruby On Rails. Handle file uploads with CompoundJS is pretty simple, now, with ExpressJS. In the beginning there were middlewares such as formidable […]

Read More