Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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 to 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 10 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