A simple, command-line http server for loading static content. It can be used for local development and testing purposes.
FileServer is cross-platform and runs on .NET 6.
dotnet tool install -g FileServer
Simply navigate to a given directory from the command line and run file-server
. Then access it from the browser on http://localhost:8080, being the default port number.
To run file-server on a custom port, provide --port
or -p
as an argument. For example
file-server --port <PORT>
It is possible to run multiple insances of file-server where each listens on a subsequent port unless a custom one is provided.
git clone https://github.com/deniskyashif/file-server.git
cd file-server/src
- Run
dotnet pack
- Run
dotnet tool install --global --add-source ./nupkg/ FileServer