https://github.com/bernmic/justmusic-javalin
Simple REST service for MP3 files written with javalin
https://github.com/bernmic/justmusic-javalin
angular angular-material java java8 javalin mp3 rest-api single-page-app typescript
Last synced: 3 months ago
JSON representation
Simple REST service for MP3 files written with javalin
- Host: GitHub
- URL: https://github.com/bernmic/justmusic-javalin
- Owner: bernmic
- Created: 2018-04-23T06:51:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T04:41:51.000Z (over 3 years ago)
- Last Synced: 2025-02-03T04:29:56.654Z (over 1 year ago)
- Topics: angular, angular-material, java, java8, javalin, mp3, rest-api, single-page-app, typescript
- Language: Java
- Size: 3.36 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JustMusic
This project is a simple prototype of an app build with Javalin. It is a REST service which serves collections of MP3 files. It can parse ID3 tags and group songs to albums and artists.
Data is stored in maps, here in Hazelcast IMap. So it can run with multiple instances. It can serve cover and the MP3 for players.
Frontend is a Single Page Application build with Angular 6 and Angular Material. Audio is done with Howler.js.
## Build
Frontend need to be built first. This will be done with the parent pom.xml.
### Frontend
To build the frontend, Node / NPM is required. After that the Angular-CLI needs to be installed.
npm i -g @angular/cli
Then go to the src/main/frondend folder and execute
npm i
ng build --prod
This will build the frontend to the dist folder.
### REST-Service
It needs Maven 3+ to build this app. Run `mvn package` to build the project. The build artifacts will be stored in the `target/` directory. If you build from the root, front and backend are build and packaged together.
## Run
It can be staret with
java -jar target/justmusic-javalin-1.0-SNAPSHOT-jar-with-dependencies.jar
and called from browser with url [http://localhost:7000](http://localhost:7000).
JustMusic looks in $HOME/.jmj for its configuration. A file called *users.json* is expected there.
Example users.json:
```json
[ {
"username" : "admin",
"password" : "admin",
"roles": "user,admin"
}, {
"username" : "user",
"password" : "user",
"roles": "user"
} ]
```