https://github.com/maxpleaner/media-backend
sinatra backend for storing music files (work in progress)
https://github.com/maxpleaner/media-backend
Last synced: 8 months ago
JSON representation
sinatra backend for storing music files (work in progress)
- Host: GitHub
- URL: https://github.com/maxpleaner/media-backend
- Owner: MaxPleaner
- Created: 2016-09-04T21:45:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-07T01:48:56.000Z (over 9 years ago)
- Last Synced: 2025-01-29T12:14:53.882Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Note this is incomplete (a work in progress)
This is the backend component of [musicker](http://github.com/maxpleaner/musicker), a website for making music by recording and looping samples.
This is relatively simple Sinatra app; mostly everything here is in [app.rb](./app.rb)
---
**_Setup_**
1. clone
2. bundle
3. `cp .env.example .env`
- make the `MEDIA_BACKEND_TOKEN` value match `musicker/.env`
4. Make sure this app is being served over HTTPS
5. `ruby app.rb`
**_Usage/Routes_**
1. `post '/rtc_audio_upload'`
- save an audio file which was recorded in the browser
2. `get "/audio_index"`
- get a list of all the saved audio files
3. `get "*"`
- basically works like a static server, but will serve .wav files with the correct Content-Type
4. `delete '/delete_audio'`
- deletes an audio file