1.1.2 • Published 11 months ago

mellon-server v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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.

1.1.1

11 months ago

1.1.0

11 months ago

1.1.2

11 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago