mirror of
https://github.com/M336G/watch-anime.git
synced 2026-07-28 22:25:59 +00:00
A simple website to watch animes that you add to it!
- JavaScript 86.7%
- CSS 13.3%
| utils | ||
| .env.example | ||
| .gitignore | ||
| app.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| tokens.json | ||
watch-anime
A simple website to watch animes that you add to it!
How to run
- Clone the repository with
git clone https://github.com/M336G/watch-anime.git, take a look at .env.example and create a.envfile if you need to configure your server. - Install Bun and run
bun installto install dependencies. - Start the project with
bun run start! Don't forget to add tokens totokens.jsonto be able to access the website!
Endpoints
| Endpoint | Description |
|---|---|
GET /anime/<anime_name> |
Get information about an anime |
GET /anime/<anime_name>/episode-<episode_number> |
Watch the episode of an anime |
GET /download/<anime_name>/thumbnail |
Download an anime's thumbnail |
GET /download/<anime_name>/episode-<episode_number>/<anime/subtitles> |
Download an anime episode or its subtitles |
Every endpoint requires authentication. Make sure you have a token value set in your cookies. If you do not have one set/valid, you'll be prompted to enter one.
Adding an anime
To add an anime, first create a directory in your ANIMES_PATH directory with an easy to remember ID for your anime.
Then, add an anime.json file inside the directory you've just created, and add the following content to it (add more if needed):
{
"id": "the-id-you-chose-for-the-anime",
"name": "The anime's name",
"description": "A short description for the anime",
"thumbnail": "thumbnail.png",
"episodes": {
"1": {
"anime": "episode-1.mp4",
"subtitles": "episode-1.vtt",
"mime": "video/mp4"
}
}
}
Add the specified files to the directory, and done!
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 Mozilla Public License Version 2.0.