Note
This project is for educational purposes only. The author of this project is not responsible for any misuse of this API. Use it at your own risk.
- Rust should be installed on your system. If not, then install it from here.
git clone https://github.com/rajput-hemant/jiosaavn-api-rs
cd jiosaavn-api-rs
- Run the following command to build the project.
cargo build --release
- Run the following command to launch the api server.
cargo run --release
- Vercel CLI should be installed on your system. If not, then install it from here.
vc dev
vc
Note
To ensure that the API consistently respects the provided language, make sure to set the Function region within Vercel to Mumbai, India (South) - bom1
.
Warning
You need to have Docker installed on your system.
You might need to run the following commands with sudo
depending on your system.
- Start Docker daemon (Skip if already running)
sudo dockerd
- Build the image
docker build -t jiosaavn .
- Run the image
docker run -p 8080:8080 jiosaavn
- Stop the container
docker ps
docker stop <container-id>
- Login to your Render account and create a new Web Service.
- Fill in the details, choose
Runtime
asRust
and click on Create Web Service.
- Install the Shuttle CLI
cargo install cargo-shuttle
- Make sure to change the
main.rs
file to the following:
// #[tokio::main]
#[shuttle_runtime::main]
// async fn main() {
async fn axum() -> shuttle_axum::ShuttleAxum {
// tracing_subscriber::fmt::init();
...
// let addr = "[::]:8080".parse().unwrap();
// tracing::debug!("π Server listening on {}", addr);
// axum::Server::bind(&addr)
// .serve(app.into_make_service())
// .await
// .unwrap();
Ok(router.into())
}
cargo shuttle project start
cargo shuttle deploy --allow-dirty
- Install the Fly CLI
curl -L https://fly.io/install.sh | sh
- A
fly.toml
file will be automatically generated byfly launch
command which will ask a few questions to set everything up.
fly launch --name jiosaavn
- Deploy the app
fly deploy
This project is licensed under the MIT License - see the LICENSE file for details.