celer

0.2.0 • Public • Published

Celer

A very simple REST implementation based on pure string matching and events.


Here is an example of the the usage :-

const http = require('http');
const Celer = require('./index')
const celer = new Celer()

const PORT=8080

celer.get('/get', function (req, res) {
  res.end('Hello World')
})

celer.post('/post', function (req, res) {
  res.send('Hello World')
})

celer.put('/post', function (req, res) {
  res.send('Hello World')
})


var server = http.createServer(celer.dispatcher)

server.listen(PORT, function(){
    console.log("Server listening on: http://localhost:%s", PORT)
})

LICENSE

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    3
  • 0.1.0
    0

Package Sidebar

Install

npm i celer

Weekly Downloads

3

Version

0.2.0

License

ISC

Last publish

Collaborators

  • bat_coder