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

http-server

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-server

A simple zero-configuration command-line http server

  • 14.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6M
decreased by-0.65%
Maintainers
3
Weekly downloads
 
Created

What is http-server?

The http-server npm package is a simple, zero-configuration command-line HTTP server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.

What are http-server's main functionalities?

Serving static files

This command serves the current directory at localhost:8080. It can be used to view static websites or any static files.

http-server -p 8080

Customizable port

This command serves the current directory on a specified port, in this case, port 3000.

http-server -p 3000

Specify the directory to serve

This command serves the specified directory instead of the current directory.

http-server /path/to/directory

HTTPS support

This command serves the current directory over HTTPS using the specified certificate and key files.

http-server --ssl --cert path/to/cert.pem --key path/to/key.pem

Enable CORS

This command serves files with CORS enabled, allowing resources to be requested from another domain.

http-server -c-1 --cors

Other packages similar to http-server

Keywords

FAQs

Package last updated on 31 May 2022

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