mirror of
https://github.com/M336G/random-file-server.git
synced 2026-07-28 22:25:57 +00:00
Serve images, videos or any file randomly to anyone!
- JavaScript 100%
| .env.example | ||
| .gitignore | ||
| app.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
random-file-server
Serve images, videos or any file randomly to anyone!
How to run
- Clone the repository with
git clone https://github.com/M336G/random-file-server.git, take a look at .env.example and create a.envfile if you need to configure your server. - Install Bun.
- Start the project with
bun run start!
Usage
Simply add files to the directory you've specified in the FILES_PATH environment variable to be able to serve them.
To fetch a random file, use GET / and to list all files available, use GET /list. You may also just use GET /<filename> to get a specific file from the FILES_PATH directory.
Contributing
Pull requests are more than welcome to the project! Feel free to open one if you feel like something needs modification or if there is any problem with the codebase.
Credits
This project is licensed under the MIT license.