https://github.com/tatchi/reserv
Static files server in Reason Native
https://github.com/tatchi/reserv
reason-native reasonml server static-file-server
Last synced: 10 months ago
JSON representation
Static files server in Reason Native
- Host: GitHub
- URL: https://github.com/tatchi/reserv
- Owner: tatchi
- License: mit
- Created: 2020-03-22T10:14:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-27T05:39:17.000Z (over 5 years ago)
- Last Synced: 2025-04-23T15:14:49.050Z (10 months ago)
- Topics: reason-native, reasonml, server, static-file-server
- Language: JavaScript
- Homepage:
- Size: 933 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
- awesome-list - reserv
README
# Reserv
Static file server with auto-reloading written in reason native. This project is heavily inspired by [servor](https://github.com/lukejacksonn/servor) but not as polished and without all the nice features it comes with. I built this mostly for fun and learning so if you need something robust, definitely reach out for something else. There are great alternatives such as [servor](https://github.com/lukejacksonn/servor), [sirv](https://github.com/lukeed/sirv/tree/master/packages/sirv-cli) or [serve](https://github.com/zeit/serve).
## Install
```
$ npm install --save reserv
```
> **Note:** This module can also be installed and used globally
## Usage
```
$ reserv --help
NAME
reserv - Start a static file server
SYNOPSIS
reserv [OPTION]... [DIRECTORY]
ARGUMENTS
DIRECTORY (absent=.)
Directory to serve
OPTIONS
-p PORT, --port=PORT (absent=8000)
Port the server will be running on.
-r ROOT_FILE, --rootFile=ROOT_FILE (absent=index.html)
Default file to serve if no path (/).
BUGS
File bug reports at https://github.com/tatchi/reserv
COMMON OPTIONS
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of `auto',
`pager', `groff' or `plain'. With `auto', the format is `pager` or
`plain' whenever the TERM env var is `dumb' or undefined.
--version
Show version information.
```
### Example
```bash
reserv build -p 8000 -r index.html
```
# Credit ❤️
Thanks to [ulrikstrid](https://github.com/ulrikstrid) and [aantron](https://github.com/aantron) for their awesome libraries ([morph](https://github.com/reason-native-web/morph) & [luv](https://github.com/aantron/luv))