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 run the project.
cargo run
- Run the following command to build the project.
cargo build
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>
- 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 router = Router::new()
...
// 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 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.fly launch
comman 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 GPL-3.0 License - see the LICENSE file for details.