Giter VIP home page Giter VIP logo

mothership's Introduction

Mothership

Build Status

Mothership is a music player interface for MPD, optimised for browsing your music collection in its original directory structure.

Mothership is built with Go, AngularJS & WebSockets providing a snappy, real-time user experience. All connected clients keep the UI in sync with the player state.

Mothership is cross-platform & extremely portable, building to a single, self-contained binary with no external dependencies other than an MPD server to point it to.

screenshots

Build

To build the Mothership binary, install the development prerequisites, then:

(cd frontend && grunt build)
go-bindata frontend.go -prefix "frontend/dist/" frontend/dist/...
go build

Cross-compilation is achieved by modifying the go build command. For example:

  • Build for a Raspberry Pi 2: GOOS=linux GOARM=7 GOARCH=arm go build
  • Build for a Raspberry Pi 1: GOOS=linux GOARM=6 GOARCH=arm go build
  • Build for linux/386: GOOS=linux GOARCH=386 go build
  • Build for darwin/386: GOOS=darwin GOARCH=386 go build
  • Build for windows/386: GOOS=windows GOARCH=386 go build

Run

Firstly, build Mothership, then:

mothership -gobrake.logtostderr=true -mpdaddr=music:6600 -port :8080
open localhost:8080

Modify -mpdaddr to point to the host:port (or ip:port) of your running MPD server.

Deploy

Deployment is simple, transfer the binary & run it. A complete example is provided below:

Develop

While developing, the assets are not packaged into a binary, this allows us to make front-end changes without rebuilding the back-end.

Install the development prerequisites, then:

(cd frontend && grunt)
go build && mothership -gobrake.logtostderr=true -mpdaddr=music:6600 -port :8080
open localhost:8080

grunt watches for changes and runs all front-end tests.

go test ./... runs all the back-end tests, or run a single package with a command like (cd handlers && go test).

Development prerequisites

  • Go
  • Node.js & npm
  • go get github.com/jteeuwen/go-bindata/...
  • (cd frontend && npm install)

Extras

License

This project uses the MIT License. See LICENSE.

mothership's People

Contributors

zefer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.