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

@loopback/http-server

Package Overview
Dependencies
Maintainers
0
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loopback/http-server

A wrapper for creating HTTP/HTTPS servers

  • 6.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36K
decreased by-5.18%
Maintainers
0
Weekly downloads
 
Created
Source

@loopback/http-server

This package implements the HTTP / HTTPS server endpoint for LoopBack 4 apps.

Overview

This is an internal package used by LoopBack 4 for creating HTTP / HTTPS server.

Installation

To use this package, you'll need to install @loopback/http-server.

npm i @loopback/http-server

Usage

@loopback/http-server should be instantiated with a request handler function, and an HTTP / HTTPS options object.

const httpServer = new HttpServer(
  (req, res) => {
    res.end('Hello world');
  },
  {port: 3000, host: ''},
);

Instance methods of HttpServer.

MethodDescription
start()Starts the server
stop()Stops the server

Instance properties of HttpServer.

PropertyDescription
addressAddress details
hosthost of the server
portport of the server
protocolprotocol of the server
urlurl the server

Contributions

  • Guidelines
  • Join the team

Tests

Run npm test from the root folder.

Contributors

See all contributors.

License

MIT

FAQs

Package last updated on 18 Nov 2024

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