This project is a simple web server that serves video files stored in a specified directory.
- rust and cargo
Follow the instructions below to run the web server:
-
Choose a directory to store the video files. For example, use the directory
/Users/user/Downloads
. -
Place a video file in the chosen directory. For example, save a file named
SampleVideo_1280x720_2mb.mp4
. -
Run the Rocket web server, specifying the
DATA_DIR
environment variable with your directory.DATA_DIR=/Users/user/Downloads cargo run
-
Open the video file in a browser. Navigate to http://localhost:8000/SampleVideo_1280x720_2mb.mp4 to view your video.