Skip to content

petitstrawberry/lastfm-api-worker

Repository files navigation

lastfm-api-worker

This is a Cloudflare Worker script that fetches the recently played / now playing track from a Last.fm user and displays it as an HTML page.

Demo

You can see a demo of this script in action here.

Setup

To set up the script, follow these steps:

  1. Clone this repository:

    git clone https://github.com/petitstrawberry/lastfm-api-worker.git
    cd lastfm-api-worker
  2. Configuration:

    Edit src/config.ts and set your Last.fm API key and your username.

    export const config = {
     API_KEY: "YOUR_API_KEY",
     USERNAME: "YOUR_USERNAME"
    }
  3. Build:

    Install dependencies:

    npm install

    Check if it is working:

    wrangler dev
  4. Deployment:

    wrangler deploy

This will deploy the script to Cloudflare Workers.

About

Cloudflare Worker script that fetches the recently played / now playing track from a Last.fm user and displays it as an HTML page.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors