Lull
Simple RESTful Web Service, written for node.js.
Installation
From your terminal, requires node.js.
npm install lull
Example web service
For more, see examples folder.
var lull = ; //// Example API:-// ------------------------------------------------------------------------------------------// | Function | Method | path[0] | path[1] | Request | Comment |// ------------------------------------------------------------------------------------------// | helloWorld | GET | hello | world | /hello/world/ | Both paths literal. |// ------------------------------------------------------------------------------------------// path: can be literal: 'hello' or placeholder: '', can set many path items.// api map:var api = name: 'helloWorld' method: 'GET' path: 'hello' 'world' ; var options = host: '127.0.0.1' port: 5555 secure: false // true = https, else http. if true set: key, cert and apikey. key: '' cert: '' apikey: '' api: api // array mapping requests to js functions.; lull
Example client
var lull = ; // make a client request to the lull web service.console;var options = hostname: '127.0.0.1' port: 5555 path: '/foo/bar/?hello=world' method: 'POST' headers: 'Content-Type': 'application/json; charset=utf-8' // json formatted data. ; var req = lull; req; // sending json formatted data.req;
License
Choose either: MIT or Apache 2.0.