Bitballs is a DoneJS app that enables users to coordinate
the players, teams, games, rounds and recordings of a basketball tournament.
It also serves as an example of how to use DoneJS with sessions, user
privileges, RESTful services, and ORM models.
To run the Bitballs app locally, run its tests, or generate its documentation
follow the steps outlined below.
On a Mac, the easiest way to install and configure PostgreSQL
is using the brew utility:
brew install postgresql
Pay special attention to the end of the brew command's
output, which includes instructions on how to start postgres:
To load postgresql:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
postgres -D /usr/local/var/postgres
The provided launchctl command ensures the postgres process is always
running, even after a system restart. The alternative postgres command
starts the postgres process manually.
We recommend the launchctl option. If desired, postgres can be
stopped and uninstalled by running:
brew uninstall postgresql
Installing PostgreSQL on Linux
Coming Soon
Installing PostgreSQL on Windows
Download and use the graphical installer available on postgresql.org. Make sure you host it listen to port 5432.
Open pg_hba.conf, which should be in C:\Program Files\PostgreSQL\9.5\data, and change from md5 authentication to trust. For example, change:
host all all 127.0.0.1/32 md5
to:
host all all 127.0.0.1/32 trust
trust should not be used in a production environment. We are only using it here as a substitute for the peer mode available in UNIX environments. Read more about it here.
Finally, using pgAdmin III graphical database manager, which should have been installed with postgres, create a bitballs database.
Download Source
Clone this repo using git:
git clone https://github.com/donejs/bitballs.git
Install Dependencies
To install the project's JavaScript dependencies run:
npm install
Additionally DoneJS's command line utilities need to be installed globally:
Bitballs is a DoneJS app that enables users to coordinate the players, teams, games, rounds and recordings of a basketball tournament. It also serves as an example of how to use DoneJS with sessions, user privileges, RESTful services, and ORM models.
To run the Bitballs app locally, run its tests, or generate its documentation follow the steps outlined below.
Setup Environment
Make sure you have installed:
Installing PostgreSQL on OSX
On a Mac, the easiest way to install and configure PostgreSQL is using the brew utility:
Pay special attention to the end of the brew command's output, which includes instructions on how to start
postgres
:The provided
launchctl
command ensures thepostgres
process is always running, even after a system restart. The alternativepostgres
command starts thepostgres
process manually.We recommend the
launchctl
option. If desired,postgres
can be stopped and uninstalled by running:Installing PostgreSQL on Linux
Coming Soon
Installing PostgreSQL on Windows
Download and use the graphical installer available on postgresql.org. Make sure you host it listen to port
5432
.Open
pg_hba.conf
, which should be in C:\Program Files\PostgreSQL\9.5\data, and change frommd5
authentication totrust
. For example, change:to:
trust
should not be used in a production environment. We are only using it here as a substitute for thepeer
mode available in UNIX environments. Read more about it here.Finally, using
pgAdmin III
graphical database manager, which should have been installed withpostgres
, create abitballs
database.Download Source
Clone this repo using git:
Install Dependencies
To install the project's JavaScript dependencies run:
Additionally DoneJS's command line utilities need to be installed globally:
Prepare the Database
Make sure the
postgres
process is running:You should see "postgres -D" among the output:
With that confirmed we can create the database that the bitballs app will persist its data to:
Next, create the database schema that the application expects by running:
Start the Server
With all the prerequisite setup completed the server can be started by running:
Register a User
Navigate to http://localhost:5000/register in your browser and follow the instructions.
Enjoy
You're finished! Explore some of the app's features:
donejs develop
)donejs test
)donejs document
)