Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajput-hemant/jiosaavn-api-ts
ðĩ A simple wrapper for the JioSaavn API powered by Hono.js ðĨ.
https://github.com/rajput-hemant/jiosaavn-api-ts
api bun-api bun-runtime bunjs honojs jiosaavn-api jiosaavn-downloader music music-api nodejs typescript vercel
Last synced: 8 days ago
JSON representation
ðĩ A simple wrapper for the JioSaavn API powered by Hono.js ðĨ.
- Host: GitHub
- URL: https://github.com/rajput-hemant/jiosaavn-api-ts
- Owner: rajput-hemant
- License: mit
- Created: 2023-08-31T09:02:06.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-06T23:14:11.000Z (8 days ago)
- Last Synced: 2024-11-07T00:27:16.117Z (8 days ago)
- Topics: api, bun-api, bun-runtime, bunjs, honojs, jiosaavn-api, jiosaavn-downloader, music, music-api, nodejs, typescript, vercel
- Language: TypeScript
- Homepage: https://jiosaavn.rajputhemant.tech
- Size: 2.71 MB
- Stars: 19
- Watchers: 3
- Forks: 29
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![][ci] ![][views] ![][stars] ![][forks] ![][issues] ![][license] ![][code-size] ![][commit-activity]
# ðĩ Jio Saavn API
### A simple wrapper for the Jio Saavn API powered by Hono.js ðĨ.
[**ð Documentation**](https://docs-jiosaavn.netlify.app/) (in progress)
## âĻ Features
- ð **Ultrafast** - Powered by [Hono.js](https://hono.dev).The router `RegExpRouter` is really fast.
- ðŠķ **Lightweight** - Has minimal dependencies.
- ð **Multi-runtime** - Works on `Bun`, `Node.js`, `Vercel` or `Cloudflare Workers`. The same code runs on all platforms.
- ðĨ Download High Quality Songs, w/ lyrics for supported songs.
- ðĩ Get Songs, Albums, Playlists, Artists, Radio Stations, Podcasts Lyrics, Recommendations, and more.
- âĪïļ Open Source## ð ïļ Building from source
- Clone the repository
```
git clone https://github.com/rajput-hemant/jiosaavn-api-ts
cd jiosaavn-api-ts
```- Install dependencies
```
bun i || pnpm i || npm i || yarn
```#### Bun
> **Warning**
> You need to have [Bun.js](https://bun.sh) installed on your machine to run the project with bun.```
bun run dev || pnpm dev || npm run dev || yarn dev
```#### Node.js
```
bun run dev:node || pnpm dev:node || npm run dev:node || yarn dev:node
```#### Vercel Dev Server
```
bun run dev:vercel || pnpm dev:vercel || npm run dev:vercel || yarn dev:vercel
```#### Cloudflare Workers
> **Warning**
> Make sure to remove Node API code from [`src/index.ts`](https://github.com/rajput-hemant/jiosaavn-api-ts/blob/master/src/index.ts) & [`config.ts`](https://github.com/rajput-hemant/jiosaavn-api-ts/blob/master/src/lib/config.ts#L8) before deploying or running the project with Cloudflare Workers.[src/index.ts](https://github.com/rajput-hemant/jiosaavn-api-ts/blob/master/src/index.ts)
```diff
...- port: +(process.env.PORT ?? 3000),
+ port: 3000, # update accordingly...
```[src/lib/config.ts](https://github.com/rajput-hemant/jiosaavn-api-ts/blob/master/src/lib/config.ts#L8)
```diff
...- enableRateLimit: process.env.ENABLE_RATE_LIMIT === "true" ?? false,
+ enableRateLimit: false, # update accordingly
...```
```
bun run dev:vercel || pnpm dev:cf || npm run dev:cf || yarn dev:cf
```## ð Deploying your own instance
You can easily deploy your own hosted version of the `JioSaavn API` by clicking on one of the links below, which will set up a ready-to-go version for you:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/rajput-hemant/jiosaavn-api-ts)
[![Deploy with Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/rajput-hemant/jiosaavn-api-ts)
**OR**
## Deploying using CLI
### Vercel
- It utilizes Edge Functions and can automatically execute in the region nearest to the user who triggers them.
- It's worth noting that `Mumbai, India (South) - bom1` is the recommended region for this project deployment.```
bun run deploy:vercel || pnpm deploy:vercel || npm run deploy:vercel || yarn deploy:vercel
```> **Note**
> We are using community based [ð° Bun runtime for âē Vercel Serverless Functions](https://github.com/vercel-community/bun) by default, You can also use [âē Vercel Serverless Functions](https://vercel.com/docs/functions/serverless-functions) w/ `Node Runtime` or [âē Vercel Edge Functions](https://vercel.com/docs/functions/edge-functions) to deploy the project.
> To use `Node Runtime` or `Edge Functions` rename the `_api` folder to `api` and remove 'buildCommand' from `vercel.json` file.### Cloudfare Workers
```
bun run deploy:cf || pnpm deploy:cf || npm run deploy:cf || yarn deploy:cf
```### Build and Run Docker Image
#### Docker Compose (Recommended)
- Start the container
```
docker-compose up -d # detached mode
```- Stop the container
```
docker-compose stop # stops the container
docker-compose down # stops and removes the container
```#### Docker
- Start Docker daemon (Skip if already running)
```
sudo dockerd
```- Build the image
```
docker build -t jiosaavn .
```- Run the image
```
docker run -p 80:3000 jiosaavn
```- Open http://localhost to view it in the browser.
- Stop the container
```
docker ps
``````
docker stop
```## ð License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ðĶū Contributors:
[views]: https://komarev.com/ghpvc/?username=jiosaavn-api-ts&label=view%20counter&color=red&style=flat
[code-size]: https://img.shields.io/github/languages/code-size/rajput-hemant/jiosaavn-api-ts
[issues]: https://img.shields.io/github/issues-raw/rajput-hemant/jiosaavn-api-ts
[license]: https://img.shields.io/github/license/rajput-hemant/jiosaavn-api-ts
[commit-activity]: https://img.shields.io/github/commit-activity/w/rajput-hemant/jiosaavn-api-ts
[forks]: https://img.shields.io/github/forks/rajput-hemant/jiosaavn-api-ts?style=flat
[stars]: https://img.shields.io/github/stars/rajput-hemant/jiosaavn-api-ts
[ci]: https://github.com/rajput-hemant/jiosaavn-api-ts/actions/workflows/ci.yml/badge.svg