DailyJS

Node Roundup: thin-orm, node-tar.gz, connect-bruteforce

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

databases node modules express middleware compression

Node Roundup: thin-orm, node-tar.gz, connect-bruteforce

Posted by Alex R. Young on .
Featured

databases node modules express middleware compression

Node Roundup: thin-orm, node-tar.gz, connect-bruteforce

Posted by Alex R. Young on .
You can send in your Node projects for review through our contact form or @dailyjs.

thin-orm

thin-orm (License: MIT, npm: thin-orm) by Steve Hurlbut is a lightweight ORM module for SQL databases with a MongoDB-inspired API:

var orm = require('thin-orm');

orm.table('users')  
   .columns('id', 'login', 'firstName', 'lastName', 'createdAt');

It's designed to be used with existing libraries, like pg and sqlite3, so you'll need one of those modules installed to use it.

thin-orm currently supports the following features:

  • Filtering
  • Sorting
  • Pagination
  • Joins
  • Optional camelCase property-to-field mapping
  • SQL injection protection

Steve has included Nodeunit tests that cover the basic functionality, and some integration tests for PostgreSQL and SQLite.

node-tar.gz

node-tar.gz (License: MIT, npm: tar.gz) by Alan Hoffmeister is a tar helper module and command-line utility, built with Node's zlib module, tar, and commander.

The module can be used to easily tar and compress a folder, and it will install a targz script that supports the zxvf flags. There are also Vows tests.

connect-bruteforce

connect-bruteforce (License: GPLv2, npm: connect-bruteforce) by Pedro Narciso GarcĂ­a Revington provides middleware that can help prevent bruteforce attacks. It will add a small delay to requests when an attack is detected.

The author has written a useful example that requires captcha validation after a successive number of validation failures: express-recaptcha.

For a simpler example, see express-hello-world.

The project includes Mocha tests.