0.2.0 • Published 6 years ago
f-serv v0.2.0
f-serv 📁
File explorer working on a server with markdown rendering and colorized file names.
Installation
npm i -g f-serv
# or
yarn global add f-serv
Usage
CLI
f-serv 80 ./ -o
If you add -o
or --open
flag in CLI it will open a new tab in a browser.
As module
const fServ = require('f-serv')
fServ(3000, './')
Options
fServ(port:number, startDir:string, open: boolean)
First option specifies the port the app will use so after launch you can find the app on localhost:/<PORT>
startDir
is a root directory where to start from.
TODO
- Added URL decode for non-English characters
- Add CLI interface
- Replace Koa with
http
module - Add more colors for file formats (0 / 30)
- Add handling for permission errors
- Add editing files
- Add different layout modes
- Get rid of
chalk
- Get rid of
open
- Fix responsive mode for narrow screens
- Setup tests with Jest