node package manager


jquery ajax-stye http requests in node


jQuery ajax-stye http requests in node

jQuery ajax is stupid simple. This project provides a lightweight wrapper for the nodejs http request object that enables jquery ajax style syntax when making serverside requests to other webpages in node.js

In addition to najax.get, , handles ssl and makes some reasonable assumptions based on inputs and everything can be overridden by passing an options object.

Install the module with: npm install najax

var najax = $ = require('najax')
$.get('', callback)
najax('', { type: 'POST' }, callback)
najax({ url: '', type: 'POST', success: callback })
najax({ url: '', type: 'POST' })
$.get, $.post, $.put, $.delete...
  • npm install && npm test

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using standardjs.