Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.01 KB

README.md

File metadata and controls

46 lines (31 loc) · 1.01 KB

LocalFileServer

Creates a read only file server to be used for sharing files locally

Screenshot

Imgur

Usage

  • Clone and cd into the directory.
  • Create a directory named files in the root of the directory.
  • Put the files you want to serve in the files directory.
# install dependencies
npm install

# start
npm start

# watch for file changes using nodemon
npm run start-watch

Tests

# run tests
npm run test

# run test watch using nodemon
npm run test-watch

File Listing

Everytime a user hits the endpoint "/", the server will fetch the list of files from files directory and list them in the index view.

File listing is done using utils/file-listing.js

Logging

Server logs every request using morgan in combined format. More information can be found here

License

MIT