Skip to content

aeroheim/mu-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mu-db

mu-db is a simple music database web app using Flask. See the images below for a look:

mu-db splash screen albums page

Build Instructions

These instructions show how to build mu-db and its necessary dependencies under Ubuntu 14.04:

Setting up Python:

mu-db requires python3 and some other related packages. You can install the necessary packages with the following command:

sudo apt-get install python3 python3-pip libpq-dev python-dev

Setting up PostgreSQL and the mu-db Database:

If you don't have PostgreSQL installed, check out the following guide on how to setup PostgreSQL. Once you have PostgreSQL installed, run psql as the postgres user and enter in the following commands in the postgres prompt:

CREATE DATABASE "mu-db";
CREATE USER "yourusername"; GRANT ALL PRIVILEGES ON DATABASE "mu-db" TO "yourusername";
ALTER USER "yourusername" WITH ENCRYPTED PASSWORD 'yourpassword';

You may choose whatever you want for the username and password. Once finished, edit in the username and password you used in the following line in dbconfig.py:

SQLALCHEMY_DATABASE_URI = "postgresql://yourusername:yourpassword@localhost/mu-db"

Finally, run the SQL script to create the tables and populate them with data with the following command:

psql "mu-db" -f db/scripts/mu-db_create.sql

Setting up the Virtual Environment & Dependencies:

It is recommended that you use virtualenv to keep mu-db's dependencies contained to itself.

pip3 install virtualenv

Create the virtual environment folder that mu-db will be using with the following command:

virtualenv venv

To install mu-db's dependencies, simply activate the virtual environment and enter:

pip3 install -r dependencies

For more information on how to use virtualenv (such as activating and deactivating), check out the following link.

Running mu-db

To run mu-db, activate the virtual environment and then run mu-db.py:

python3 mu-db.py

You can use the web app on localhost:5000 as configured in mu-db.py, or add in your own server to run it on. Have fun!

About

music database web app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published