#![feature(proc_macro_hygiene, decl_macro)] #[macro_use] extern crate rocket; use rspotify::spotify::client::Spotify; use rspotify::spotify::oauth2::{SpotifyClientCredentials, SpotifyOAuth}; use rspotify::spotify::util::get_token; mod serve; fn main() { // Set client_id and client_secret in .env file or // export CLIENT_ID="your client_id" // export CLIENT_SECRET="secret" // export REDIRECT_URI=your-direct-uri // Or set client_id, client_secret,redirect_uri explictly // let oauth = SpotifyOAuth::default() // .client_id("this-is-my-client-id") // .client_secret("this-is-my-client-secret") // .redirect_uri("http://localhost:8888/callback") // .build(); rocket::ignite() .mount("/", routes![serve::token, serve::get_tracks]) .launch(); }