@page mosaico Mosaico @group mosaico.components Components @group mosaico.clientModels Client Models @group mosaico.services Services @group mosaico.serviceModels Service Models
Mosaico 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.
If you want to run and build plain old mosaico we stayed compatible with it at present
- host /mosaico directly
- src /mosaico grunt build:old
If you want to run the new fresh with own backend.
- npm install && npm start
- optinal updates - src /mosaico grunt build our mosaico src automaticly updates /public/mosaico
To run the Mosaico app locally, run its tests, or generate its documentation follow the steps outlined below.
- Setup Environment
- Download Source
- Install Dependencies
- Prepare the Database
- Start the Server
- Register a User
- Enjoy
Make sure you have installed:
- Node 7
- NPM 3 (packaged with Node)
- OPTIONAL -PostgreSQL
Clone this repo using git:
git clone https://github.com/direktspeed/mosaico.git
Navigate to the repository's directory
cd mosaico
- npm install
- npm run db-migrate
Make sure the postgres
process is running:
ps | grep postgres
You should see "postgres -D" among the output:
92831 ttys000 0:00.02 postgres -D /usr/local/var/postgres
92856 ttys000 0:00.00 grep postgres
With that confirmed we can create the database that the mosaico app will persist its data to:
createdb mosaico
To install the project's JavaScript dependencies run:
npm install
We bundle a small Dockerfile based on centos7 to test mosaico with no need to install dependencies.
docker build -t mosaico/mosaico .
docker run -p 9006:9006 mosaico/mosaico
then open a browser to point to the port 9006 of your docker machine IP.
First you have to build it using grunt, then you can read (https://github.com/voidlabs/mosaico/wiki/Serving-Mosaico).
Additionally DoneJS's command line utilities need to be installed globally: if you want to use donejs * commands
npm install -g donejs-cli
With all the prerequisite setup completed the server can be started by running:
npm start
# Optional - donejs start
Navigate to http://localhost:5000/register in your browser and follow the instructions.
You're finished! Explore some of the app's features:
- Live reload (
npm run develop
) OR (donejs develop
) - Run the tests (
npm test
) OR (donejs test
) - Generate the documentation (
npm run document
) OR (donejs document
)
See the CONTRIBUTING file