Socket
Socket
Sign inDemoInstall

aldo-http

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aldo-http

Enhanced HTTP createServer module for Node.js


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Aldo-http is an enhanced HTTP createServer module for Node.js. It provides a decorated version of IncomingMessage and ServerResponse objects. The API is mostly similar to Koa

Installation

npm add aldo-http

Example

const { createServer } = require('aldo-http')

// server
const server = createServer((request, response) => {
  // will send and end the response stream
  response.send('Hello world!')
})

// start
server.listen(3000)

The above code is similar than the following

const { createServer } = require('http')

// server
const server = createServer((request, response) => {
  let content = 'Hello world!'

  response.setHeader('Content-Type', 'text/plain; charset=utf-8')
  response.setHeader('Content-Length', Buffer.byteLength(content))
  response.end(content)
})

// start
server.listen(3000)

Testing

npm test

Keywords

FAQs

Package last updated on 07 Feb 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc