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

mellon-server

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mellon-server

A small hackable HTTP server

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

mellon-server

A small experimental hackable HTTP server.

Install

npm install mellon-server

Run server

npx mellon-server

Hackable

const { start_server } = require('mellon-server');

start_server({
    host: 'localhost',
    port: 8000,
    public: './public',
    base: 'https://my.base.url/service',
    registry: [
       { path: 'demo' , do: doDemo },
       { path: 'test/.*', do: './hander/demo.js', with: { myOption: 123 }}
    ]
});

function doDemo(req,res,opts) {
    res.writeHead(200);
    res.end('Hello World!');   
}

All files in the public directory will be served to the world. Directories and files can have a .meta JSON file which contains extra HTTP headers that should be added to the HTTP response.

FAQs

Package last updated on 11 Sep 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