RegExpRouter
is really fast.Bun
, Node.js
, Vercel
or Cloudflare Workers
. The same code runs on all platforms.git clone https://github.com/rajput-hemant/jiosaavn-api-ts
cd jiosaavn-api-ts
bun i || pnpm i || npm i || yarn
Warning You need to have Bun.js installed on your machine to run the project with bun.
bun run dev || pnpm dev || npm run dev || yarn dev
bun run dev:node || pnpm dev:node || npm run dev:node || yarn dev:node
bun run dev:vercel || pnpm dev:vercel || npm run dev:vercel || yarn dev:vercel
Warning Make sure to remove Node API code from
src/index.ts
&config.ts
before deploying or running the project with Cloudflare Workers.
...
- port: +(process.env.PORT ?? 3000),
+ port: 3000, # update accordingly
...
...
- 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
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 by default, You can also use ⲠVercel Serverless Functions w/
Node Runtime
or ⲠVercel Edge Functions to deploy the project. To useNode Runtime
orEdge Functions
rename the_api
folder toapi
and remove 'buildCommand' fromvercel.json
file.
bun run deploy:cf || pnpm deploy:cf || npm run deploy:cf || yarn deploy:cf
docker-compose up -d # detached mode
docker-compose stop # stops the container
docker-compose down # stops and removes the container
sudo dockerd
docker build -t jiosaavn .
docker run -p 80:3000 jiosaavn
Open http://localhost to view it in the browser.
Stop the container
docker ps
docker stop <container-id>