diff options
| author | Ritesh Ghosh <[email protected]> | 2023-08-19 23:37:15 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-19 23:37:15 +0530 |
| commit | 1f339d0bbd19fd7108ba7fe204dbf8f0dddbeaeb (patch) | |
| tree | 252bd856b1fd805ba33ab300d2c1191502f509e4 | |
| parent | 681a4487156c3eab9a2bddacd6a0b06388b68c6a (diff) | |
| download | aniwatch-api-1f339d0bbd19fd7108ba7fe204dbf8f0dddbeaeb.tar.xz aniwatch-api-1f339d0bbd19fd7108ba7fe204dbf8f0dddbeaeb.zip | |
docs: added docker installation docs
| -rw-r--r-- | README.md | 38 |
1 files changed, 29 insertions, 9 deletions
@@ -39,6 +39,14 @@ /> </a> <a + href="https://github.com/ghoshRitesh12/aniwatch-api/actions/workflows/docker-build.yml" + > + <img + src="https://github.com/ghoshRitesh12/aniwatch-api/actions/workflows/docker-build.yml/badge.svg" + alt="docker-build" + /> + </a> + <a href="https://github.com/ghoshRitesh12/aniwatch-api/actions/workflows/test.yml" > <img @@ -62,14 +70,13 @@ </p> </p> -> ## Work In Progress 🛠️ -> -> This api is currently a work in progress +> NOTE: [https://api-aniwatch.onrender.com](https://api-aniwatch.onrender.com/) is only meant to demo the API and has rate-limiting enabled to minimise bandwidth consumption. It is recommended to deploy your own instance for personal use. ## Table of Contents - [Installation](#installation) - [Local](#local) + - [Docker](#docker) - [Documentation](#documentation) - [GET Anime Home Page](#get-anime-home-page) - [GET Anime About Info](#get-anime-about-info) @@ -108,10 +115,23 @@ ``` Now the server should be running on [http://localhost:4000](http://localhost:4000) + +### Docker + +Docker image is available at [GitHub Container Registry](https://github.com/ghoshRitesh12/aniwatch-api/pkgs/container/aniwatch). + +Run the following command to pull and run the docker image. + ```bash + docker pull ghcr.io/ghoshritesh12/aniwatch + docker run -p 4000:4000 ghcr.io/ghoshritesh12/aniwatch + ``` +The above command will start the server on port 4000. You can access the server at [http://localhost:4000](http://localhost:4000) and you can also change the port by changing the `-p` option to `-p <port>:4000`. + +You can also add the `-d` flag to run the container in detached mode. ## <span id="documentation">📚 Documentation</span> -Below are the endpoints exposed by the api: +The endpoints exposed by the api are listed below with examples that uses the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), but you can use any http library. ### `GET` Anime Home Page @@ -704,11 +724,11 @@ http://localhost:4000/anime/episode-srcs?id={episodeId}&server={server}&category #### Query Parameters -| Parameter | Type | Description | Required? | Default | -| :---------: | :----: | :-------------------------------------------: | :-------: | :------------: | -| `episodeId` | string | The id of the episode. | Yes | -- | -| `server` | string | The name of the server. | No | "vidstreaming" | -| `category` | string | The category of the episode ('sub' or 'dub'). | No | "sub" | +| Parameter | Type | Description | Required? | Default | +| :---------: | :----: | :-------------------------------------------: | :-------: | :------------: | +| `id` | string | The id of the episode. | Yes | -- | +| `server` | string | The name of the server. | No | `"vidstreaming"` | +| `category` | string | The category of the episode ('sub' or 'dub'). | No | `"sub"` | #### Request sample |
