Creates a read only file server to be used for sharing files locally
- 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
- Open your browser and navigate to http://localhost:9000
# run tests
npm run test
# run test watch using nodemon
npm run test-watch
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
Server logs every request using morgan
in combined
format. More information can be found here
MIT