ellipse

0.5.5 • Public • Published

view on npm npm module downloads per month Analytics

Ellipse

It's a super-simplified web framework inspired by Express for those cases when you don't need templates, render engines and all the fancy stuff. A combination of a router, a middleware chain and a bunch of response helper utilities. Not more, not less.

Usage

 
var ellipse = require('ellipse'),
    app     = ellipse()
 
app.get('/', function (req, res) {
    var name = req.query.name || 'Ellipse'
 
    res.send('Welcome ' + name + '!')
})
 
app.get('/:name', function (req, res) {
    res.html('<h1>Hello ' + req.params.name + '!</h1>')
})
 
app.get('/:greeting/:name', function (req, res) {
    res.json({
        status: 'success',
        data: {
            greeting: req.params.greeting,
            name:     req.params.name
        }
    })
})
 
app.listen(3333, function () {
    console.log('server is ready to accept connections on port 3333')
})
 

For more information, see the examples.

Installation

With npm:

npm install --save ellipse

With git:

git clone git://github.com/schwarzkopfb/ellipse.git

License

MIT license.

Package Sidebar

Install

npm i ellipse

Weekly Downloads

7

Version

0.5.5

License

MIT

Last publish

Collaborators

  • schwarzkopfb