https://github.com/ken-okabe/minimal-http-server
node minimal-http-server just works as expected, good for built-in something
https://github.com/ken-okabe/minimal-http-server
http minimal node-module server
Last synced: 6 months ago
JSON representation
node minimal-http-server just works as expected, good for built-in something
- Host: GitHub
- URL: https://github.com/ken-okabe/minimal-http-server
- Owner: ken-okabe
- License: mit
- Created: 2018-08-11T18:17:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-11T18:45:30.000Z (over 7 years ago)
- Last Synced: 2025-10-11T06:32:07.873Z (6 months ago)
- Topics: http, minimal, node-module, server
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/minimal-http-server
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minimal-http-server
node minimal-http-server just works as expected, good for built-in something
## Usage
```
import { server } from "./server.js";
const dir = "./www";
const port = 19999;
const serverUp = () => {
console.log("server up " + port);
};
server(dir)(port)(serverUp);
```
To take advantage of ES6 Module(ESM),
recommend to use
https://www.npmjs.com/package/esm
or simply copy&paste the function to your projcet from the source-code :
https://github.com/kenokabe/minimal-http-server/blob/master/server.js
## MIT License