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
yarn install
# start
yarn start
# watch for file changes using nodemon
yarn run start-watch
- Open your browser and navigate to http://localhost:3000
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