src | ||
static | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
config_job-service_example.toml | ||
config_webserver_example.toml | ||
LICENSE | ||
README.md |
PL-Service is a web service, that allows Spotify users to create a personalized playlist containing the most recently published tracks of all followed artists and updates this playlist regularly.
You can try it out at the public instance at (plservice.tecks.eu)[https://plservice.tecks.eu].
Prerequisites
Spotify client credentials
Before you can start the service you need to registering the app to get the necessary client credentials. (https://developer.spotify.com/dashboard/applications)
The service expects the client ID and client secret you get from Spotify to be set as environment variables
RSPOTIFY_CLIENT_ID
and RSPOTIFY_CLIENT_SECRET
. If they are not present, it may also read them from a .env
file.
Database
PL-Service uses a CouchDB to store user data and information on created jobs and Redis to store user sessions.
Build
To build the service for production run the following in the cloned repository:
$ cargo build --release
This compiles both binaries PL-Service consists of.
Configuration
This repository contains the exemplary config files config_webserver_example.toml
and
config_job-service_example.toml
, which can be used to configure the corresponding service.
The files need to be adjusted before they can be used.
All possible options and arguments are explained in the example files.
Running
To run the service two executables must be started by running the following commands:
$ cargo run --bin=webserver -- --config-file <config_webserver.toml> &
$ cargo run --bin=job-server -- --config-file <config_webserver.toml>
or, if you already built the executables:
$ ./target/release/webserver &
$ ./target/release/job-service
TODOs
- Possible new features include creating/maintaining unions or intersections of arbitrary playlists.
- Creation of playlist containing the most played tracks.