Skip to content

Set Up a Node

Alejandro edited this page Feb 18, 2024 · 14 revisions

I'm glad to hear you're interested in setting up a TEMPOBEAST Node!

The process is quite simple, and you only need a few things.

REQUIREMENTS

  1. A NodeJS instance with express
  2. A local network connection (for a local node)
  3. Our example server node files

How To

If you're not aware of how to run a NodeJS server, do a quick search - there's lots of tutorials that will walk you through the process, depending on your OS and configuration.

  1. Go to the main page of this repo, and click the green "Code" button.

  2. Click "Download ZIP" - extract the downloaded ZIP file.

  3. Open/edit the music.js file, you'll need to change the "musicFolder" const so that it points to the location of the music folder that came with the zip.

  4. Run the music.js file.

  5. Your node should be running in localhost, please visit our "How to Play" article for more details on connecting to your node from the client.

Previews

Previews are meant to be short (about 30 - 50 seconds long) tracks that loop in TEMPOBEAST’s main menu. To specify the tracks you want to use, open the previews.json file in the music folder, and edit it accordingly. Once the client requests a preview, the server will pick one randomly from the JSON file and send the URL back to the client for download.

Things to consider

  • If you want your Node to go public, there will be more setup needed, such as DNS records (for custom domains), Cloudflare proxying (to maximise speed and mitigate attacks), and port forwarding. If you do not have knowledge on how to deal with the aforementioned aspects, maybe it is wiser for your node to remain local.

  • The client does not support caching. This means, it will always request the data from your node, and never store anything locally. If you're planning to go public, and want to avoid high bandwidth usage, I advise you set up Cloudflare (which, if properly configured will also help with attack mitigation).

  • To add more tracks to your node, please visit our Mapping article.

Be a responsible node owner

Our TEMPOBEAST client will not artificially limit you on regards of how long your tracks, or maps can be. Feel free to create 3 hours long levels. However, a player using limited internet connection may not be happy to stumble across a +15MB audio download.

  • Do always try to compress your audio files while preserving as much quality as possible.
  • Do consider avoiding offensive/harsh content, it may be a wise thing to do.
  • Unless done for attack mitigation concerns, do consider avoiding excessive logging (such as "IP xxx.yyy.zz has played A song B times"). If you're going to practice this, maintain transparency with your users by stating these actions before they initiate a connection with your node.
Clone this wiki locally