Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

kpax

0.0.5 • Public • Published

kpax - v0.0.5

Ultralight and fastest RESTful for NodeJS/Express/AngularJS

Instalation:

$ npm install --save kpax

Example:

var express = require('express');
var app = express();
var server = http.createServer(app);
var kpax = require('kpax')(server);
 
// methods: [get, post, put, head, del]
kpax.get('/something', function(req, res) {
  if(req.params.id) {
    findById(req.params.id, function(err, ret) {
      res.send(ret);
    });
  } else {
    res.send('not found')
  }
});
 
// or using kpax-prefix on express
app.post('kpax:/something', function(req, res) {});

Copyright (c) 2014 Dg Nechtan

MIT

install

npm i kpax

Downloadsweekly downloads

5

version

0.0.5

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability