@musichub/backend

0.5.2 • Public • Published

MusicHub Back-end - for the powerful online & offline music player

ANNOUNCEMENT FOR DIVISION

Starting with this release v0.4.0, the original "MusicHub" repo is split into front-end and back-end part, which are included in project MusicHub.

Below is README of the original repo, with partial changes to ensure that users can use both the new and old versions of it.


Introduction

This project aims to standardize music experience and concentrate music resources on the Web which is available almost anytime and anywhere - with only a supported browser (you must have one nowadays).

It's a server-side app - it needs to be set up on a server, and it's recommended to spare sufficient disk space (and choose one outside China mainland if you want to enjoy music on some banned platforms).

It supports (or will support) plugins/addons for many other music platforms and custom themes.

Getting started

Source (recommended)

Important! Ts.ED requires Node >= 14, Express >= 4 and TypeScript >= 4.

For Linux/OS X users, open your terminal and clone this repo:

git clone https://github.com/MusicHubTS/backend.git musichub-backend

Then change directory into it and choose the branch you want (main is recommended):

cd musichub-backend
git checkout main

Don't forget to copy configurations from example, or MusicHub will read built-in default settings:

cp config.example.yml config.yml

Note that git ignores config.yml by default, which is defined in .gitignore.

Now, follow the commands Ts.ED provided by default:

# install dependencies
$ npm install

# serve
$ npm run start

# build for production
$ npm run build
$ npm run start:prod

NPM

Note: The package has been published to NPM, but is not fully tested. It's just a placeholder.

npm install @musichub/backend

Docker

Note: It's just a default method for running Ts.ED projects. It's not fully tested for this one. It's still recommended to use traditional source installation method.

# build docker image
docker compose build

# start docker image
docker compose up

Barrelsby (currently disabled)

It's currently disabled. See commit 54a3b8b1982cacf73c994e6cabcfd0928b3b4a38 and issue #1.

This project uses barrelsby to generate index files to import the controllers.

Edit .barreslby.json to customize it:

{
  "directory": [
    "./src/controllers/rest",
    "./src/controllers/pages"
  ],
  "exclude": [
    "__mock__",
    "__mocks__",
    ".spec.ts"
  ],
  "delete": false
}

To-do

  • [ ] Search engine
    • [ ] Local search
    • [ ] Online search
  • [ ] Resource management
    • [ ] Local management
    • [ ] Download/Upload
  • [ ] Plugins/Addons
    • [ ] Music API
      • [ ] NetEase Cloud Music
      • [ ] YouTube Music

Branches

  • main: stable upstream branch
  • unstable: unstable upstream branch, default at present
  • *(-|_)dev(-|_)*: development branches for the collaborators, just ignore them!
  • archived: old version of "MusicHub"

Contribution

Lacking enough public details of this project like code styles and specifications, it's better for you to provide with bug reports and feature requests in Issue page at present.

Changelog

CHANGELOG.md

License

MIT license

Dependencies (33)

Dev Dependencies (32)

Package Sidebar

Install

npm i @musichub/backend

Weekly Downloads

1

Version

0.5.2

License

MIT

Unpacked Size

29.7 kB

Total Files

36

Last publish

Collaborators

  • littleye233