Skip to content

First Usage

SerenaG edited this page Dec 28, 2014 · 2 revisions

MaaP is an npm module. To create a new project, follow the steps below. All you need is a terminal and the Node Package Manager installed.

Installation

  1. Install MaaP from the Node Package Manager:

$> npm install -g maap

  1. Create a new application using the model provided by MaaP framework. On the directory where you want to create the application do:

$> maap create <ProjectName>

where <ProjectName> is the name of the project you'd like to create;

  1. To install the application dependencies:

$> cd <ProjectName> $> npm install

Configuration

  1. For application configuration: open with a text editor the config.js file generated with the application and configure it following the section New Project configuration.

  2. For collections configuration see DSL File Configuration. Into the collections directory there are some DSL example files.

Start MaaP

  1. Start the application server:

$> npm start

  1. Visit 'http://localhost:3000/` to see your brand new MaaP dashboard! Remember that on the first usage the collections are empty, you need to populate the example database.

Populate the example database

  1. Cd into the extra directory:

$> cd extra/

  1. Execute the example users populate database script:

$> ./populate-users-db.sh –host localhost –port 27017 -db users

  1. Run the example collections populate script:

$> ./populate-data-db.sh –host localhost –port 27017 -db users

These population are made on the default database.