Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spencerjibz/fileserver
A simple command line tool that initiates a static-asset http server in specified directory. Inspired by the Pythons Http module (http.server method)
https://github.com/spencerjibz/fileserver
cli commanderjs filesever nodejs server
Last synced: about 6 hours ago
JSON representation
A simple command line tool that initiates a static-asset http server in specified directory. Inspired by the Pythons Http module (http.server method)
- Host: GitHub
- URL: https://github.com/spencerjibz/fileserver
- Owner: spencerjibz
- License: mit
- Created: 2020-03-23T02:26:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-31T04:49:26.000Z (about 1 year ago)
- Last Synced: 2023-10-31T05:27:41.782Z (about 1 year ago)
- Topics: cli, commanderjs, filesever, nodejs, server
- Language: JavaScript
- Homepage:
- Size: 47.4 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## FileServer
[![Node.js CI](https://github.com/spencerjibz/fileServer/actions/workflows/node.js.yml/badge.svg)](https://github.com/spencerjibz/fileServer/actions/workflows/node.js.yml)
A simple command line tool that initiates a static-asset http server in specified directory. Inspired by the Pythons Http module (http.server method)
### Requirements for usage
- Nodejs (v6.x and higher)
- git
- node-gyp ( maybe not be necessary). for installation of Sqlite3 binding for nodejs### Installation
clone the repo(run the command below with in powershell,cmd or bash) or download zipped folder(if you've download the zip folder just run npm install).
` git clone https://github.com/spencerjibz/fileServer.git && cd fileServer && npm install`
### Features
- logs all responses and status codes
- Opens the browser with start command.
- Cross platform (Windows and Linux-based systems)
- stops all instances running with the kill command()### Usage
```Usage: app [options] [command]
Options:
-V, --version output the version number
-h, --help output usage informationCommands:
start|s [options] starts a file server in a given directory or current directory by default
kill|k stops all instances of the fileServer active```
![](https://raw.githubusercontent.com/spencerjibz/fileServer/master/assets/general.gif)
### key Facts on Usage
1.**Start Command**:
```
starts a file server in a given directory or current directory by defaultOptions:
-d,--dirName [value] The directory served
-p,--port [value] The port for server, default port is 7000
-N,--noBrowser [value] disable opening the browser,default is false
-h, --help output usage information```
Start fileServer and open browser . This is the default setting
![](https://raw.githubusercontent.com/spencerjibz/fileServer/master/assets/startCommand.gif)Start fileServer without opening browser
![](https://raw.githubusercontent.com/spencerjibz/fileServer/master/assets/NobrowserCommand.gif)
2.**Kill Command**:
```
stops all instances of the fileServer activeOptions:
-h, --help output usage information```
![](https://raw.githubusercontent.com/spencerjibz/fileServer/master/assets/killCommand.gif)
3.**Usage illustration**
![](https://raw.githubusercontent.com/spencerjibz/fileServer/master/assets/Crd.gif)
Enjoy the rest of the features
### Testing
Ensure that atleast one instance of the fileServer is running before running the command below.
` cd file Server && npm test`
![](https://raw.githubusercontent.com/spencerjibz/fileServer/master/assets/tests.gif)### License
[MIT](https://github.com/spencerjibz/fileServer/blob/master/LICENSE)