-
Notifications
You must be signed in to change notification settings - Fork 1
Home
İshak Gönül edited this page Aug 1, 2023
·
3 revisions
This Go File Browser API is a simple HTTP server that serves two endpoints:
/folder-metadataand/file-content. The API allows you to retrieve metadata for a given folder and download files.
To start the server and browse a folder located at /path/to/your/folder on port 8080, run the following command:
./filebrowser /path/to/your/folder 8080You can then access the endpoints:
http://localhost:8080/folder-metadata?path=/path/to/your/folderhttp://localhost:8080/file-content?fileName=yourfile.txt
Please replace /path/to/your/folder with the actual path to the folder you want to browse and yourfile.txt with the name of the file you want to download.
Remember to test the API with your desired folder and file paths to ensure it meets your requirements.
TESTS ARE FAILING, NEED TO REFACTOR TESTS%