Caution
Project is abandoned
Important
new Project is underway with TypeScript and React
anime API server and Nextjs client
- .env for server .
make .env and put data in it
cd server
SERVER_URL=mongodb+srv://xxxxxxxxxxxxxxxxxxx CLIENT=http://localhost:3000 SERVER=http://localhost:3001
- .env.local for client
make .env.local and put data int it
cd client
NEXT_PUBLIC_SERVER=http://localhost:3001 NEXT_PUBLIC_CLIENT=http://localhost:3000
-
Clone the repository and move into the directory.
git clone https://github.com/falcon71181/falcon_anime cd falcon_anime
-
Install all the dependencies. for server
cd server
for client
cd client
npm i #or yarn install or pnpm i
-
Start the server!
cd server
npm run dev #or yarn run dev or pnpm run dev
Now the server should be running on [http://localhost:3001] - (http://localhost:3001)
-
Start the client!
cd client
npm run dev #or yarn run dev or pnpm run dev
Now the server should be running on [http://localhost:3000] - (http://localhost:3000)
https://https://falconanime.onrender.com/home
const resp = await fetch("https://falconanime.onrender.com/home");
const data = await resp.json();
console.log(data);
{
genres: ["Action", "Cars", "Adventure", ...],
latestEpisodeAnimes: [
{
id: string,
name: string,
poster: string,
duration: string,
type: string,
rating: string,
episodes: {
sub: number,
dub: number,
}
},
{...},
],
spotlightAnimes: [
{
id: string,
name: string,
jname: string,
poster: string,
description: string,
rank: number,
otherInfo: string[],
episodes: {
sub: number,
dub: number,
},
},
{...},
],
top10Animes: {
today: [
{
episodes: {
sub: number,
dub: number,
},
id: string,
name: string,
poster: string,
rank: number
},
{...},
],
month: [...],
week: [...]
},
topAiringAnimes: [
{
id: string,
name: string,
jname: string,
poster: string,
},
{...},
],
topUpcomingAnimes: [
{
id: string,
name: string,
poster: string,
duration: string,
type: string,
rating: string,
episodes: {
sub: number,
dub: number,
}
},
{...},
],
trendingAnimes: [
{
id: string,
name: string,
poster: string,
rank: number,
},
{...},
],
}
https://falconanime.onrender.com/anime/:id
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
id |
string | The unique anime id (in kebab case). | Yes | -- |
const resp = await fetch(
"https://falconanime.onrender.com/anime/jujutsu-kaisen-2nd-season-18413"
);
const data = await res.json();
console.log(data);
{
anime: [
info: {
id: string,
name: string,
poster: string,
description: string,
stats: {
rating: string,
quality: string,
episodes: {
sub: number,
dub: number
},
type: string,
duration: string
}
}
moreInfo: {
aired: string,
genres: ["Action", "Mystery", ...],
status: string,
studios: string,
duration: string
...
}
],
mostPopularAnimes: [
{
episodes: {
sub: number,
dub: number,
},
id: string,
jname: string,
name: string,
poster: string,
type: string
},
{...},
],
recommendedAnimes: [
{
id: string,
name: string,
poster: string,
duration: string,
type: string,
rating: string,
episodes: {
sub: number,
dub: number,
}
},
{...},
],
relatedAnimes: [
{
id: string,
name: string,
poster: string,
duration: string,
type: string,
rating: string,
episodes: {
sub: number,
dub: number,
}
},
{...},
],
seasons: [
{
id: string,
name: string,
title: string,
poster: string,
isCurrent: boolean
},
{...}
]
}
https://falconanime.onrender.com/anime/search?q={query}&page={page}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
q |
string | The search query, i.e. the title of the item you are looking for. | Yes | -- |
page |
number | The page number of the result. | No | 1 |
const resp = await fetch(
"https://falconanime.onrender.com/anime/search?q=titan&page=1"
);
const data = await resp.json();
console.log(data);
{
animes: [
{
id: string,
name: string,
poster: string,
duration: string,
type: string,
rating: string,
episodes: {
sub: number,
dub: number,
}
},
{...},
],
mostPopularAnimes: [
{
episodes: {
sub: number,
dub: number,
},
id: string,
jname: string,
name: string,
poster: string,
type: string
},
{...},
],
currentPage: 1,
totalPages: 1,
hasNextPage: false
}