A rest API for remotely manipulating a filesystem.
You can run fs-api with the included run.sh script.
bash scripts/run.sh
You can also use make to:
linuxcompiles for linuxdarwincompiles for darwindockerizebuilds a local docker imagecleanclear local buildstestruns unit tests
To run the containerized app:
make dockerize
docker run -p 3030:3030 fs-api:latest [<ARGS>]
./fsapi -h
Usage of ./fs-api:
-port int
the server port (default 3030)
-root string
the root directory to expose for browsing (default "$HOME")
GET /
Returns a listing of the metadata of objects in the configured root directory
GET /:path
Returns either:
- The file contents as string, if
pathis a file - A listing of metadata objects if
pathis a directory