alan
/
sfs
1
Fork 0

switch to executable sfs.js

This commit is contained in:
Alan Faubert 2020-11-06 07:47:06 -05:00
parent 3028bb6b39
commit 8efcd4686b
3 changed files with 4 additions and 3 deletions

View File

@ -6,12 +6,12 @@ Extremely minimal static file server and indexer. HTTP-only. Bring your own reve
## Installation
Clone. Install npm dependencies. Optionally symlink to `sfs` from somewhere in your `PATH`.
Clone. Install npm dependencies. Optionally symlink to `sfs.js` from somewhere in your `PATH`.
## Usage
```
sfs <port> [host]
sfs.js <port> [host]
```
Starts a server on the given `port` for the current working directory. Binds to localhost only unless `host` is specified.

1
sfs
View File

@ -1 +0,0 @@
node "$(readlink -e "$0")".js "$@"

2
sfs.js Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');