https://github.com/chasyumen/lite-web-server
Simple web server
https://github.com/chasyumen/lite-web-server
http http-server node-js nodejs nodejs-modules webserver
Last synced: 11 months ago
JSON representation
Simple web server
- Host: GitHub
- URL: https://github.com/chasyumen/lite-web-server
- Owner: chasyumen
- License: mit
- Created: 2021-09-29T20:39:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-27T17:32:25.000Z (over 3 years ago)
- Last Synced: 2025-01-30T16:58:16.712Z (about 1 year ago)
- Topics: http, http-server, node-js, nodejs, nodejs-modules, webserver
- Language: JavaScript
- Homepage: https://lite-web-server.js.org/
- Size: 527 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# lite-web-server
[](https://github.com/chasyumen/lite-web-server/blob/main/LICENSE) [](https://npmjs.com/package/lite-web-server) [](https://github.com/chasyumen/lite-web-server) [](https://github.com/chasyumen/lite-web-server/actions/workflows/node.js.yml)
lite-web-server is a simple library for creating a web server.
Please support the developer by adding stars to the [Github Repository](https://github.com/chasyumen/lite-web-server).
[Documantation](https://lite-web-server.js.org/)
[Github](https://github.com/chasyumen/lite-web-server)
[NPM](https://npmjs.com/package/lite-web-server)
[Example Gist](https://gist.github.com/chasyumen/b96573602863354cedb2df963bbff425)
## Installation
```bash
npm i lite-web-server
```
## Example
Using `dir` option, you can specify the directory to load files from.
By default, the directory will be `./public/`.
```js
const { WebServer } = require("lite-web-server");
const server = new WebServer({
dir: "./public_html/" // `./public/` by default
});
server.start();
```
## License
© chasyumen 2021. Released under the MIT license