ttu / dotnet-fake-json-server

Fake JSON Server is a Fake REST API that can be used as a Back End for prototyping or as a template for a CRUD Back End.
https://ttu.github.io/dotnet-fake-json-server/
MIT License
388 stars 84 forks source link

Extend support for static files #35

Closed ttu closed 5 years ago

ttu commented 5 years ago

Current functionality serves files from wwwroot https://github.com/ttu/dotnet-fake-json-server#static-files

Should work same way as e.g. Node's Serve https://www.npmjs.com/package/serve

$ npm install -g serve

# Server all files from root
$ serve -s .

Usage could be like this:

$ dotnet install --global FakeServer

# Server files from root
$ fake-server --serve .

# Server files from specific folder
$ fake-server --serve ./files
$ fake-server -s ./files
$ fake-server -s C:\temp\files
$ fake-server -s /home/timmy/app/dist
ttu commented 5 years ago

Implementation in branch: https://github.com/ttu/dotnet-fake-json-server/tree/serve-static-files