Socket
Socket
Sign inDemoInstall

ellipse

Package Overview
Dependencies
18
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ellipse

Minimalistic toolchain to make writing of vanilla http servers more enjoyable.


Version published
Weekly downloads
88
increased by877.78%
Maintainers
1
Install size
284 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 02 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc