This is very simple media server implementation written in node js. It uses express and typescript and would be user as API to serve media files and metadata.
- Clone this repository
- Install dependencies by running,
yarnornpm i - Start
yarn startornpm run start
| resource | description |
|---|---|
/health |
used to check the server health |
/library |
returns a list of all songs available on the server |
/library/:songId |
returns a song by id |
/storage/:filename |
returns a song file by filename(filename should be taken from metadata) |
NODE_ENV - node env(production, development, test)
PORT - server port. Default is 3000
HOST - server host. Default is localhost
DB_PATH - path to the metadata json file. Default is metadata.json
AWS_ACCESS_KEY_ID - AWS access key id. Required
SECRET_ACCESS_KEY_ID - AWS secret access key id Required
S3_BUCKET_NAME - AWS s3 bucked name Required
DISCOGS_API_KEY - API key for discogs Required
DISCOGS_SEARCH_URL - discogs api search url
Metadata format contains meta information about the existing songs on the server Required fields:
id- unique id for a songfilename- unique filename for a song