1.1.0 • Published 9 years ago

maaperture v1.1.0

Weekly downloads
4
License
BSD-3-Clause
Repository
github
Last release
9 years ago

Maaperture

MongoDB as an Admin Platform

Copyright (c) 2014, Aperture Software

All rights reserved.

Install from npm:

npm install -g maaperture

Usage:

maaperture <command> [options]

Commands:

create                 		create and initialize a new empty project

Options:

-h, --help                  output usage information
-V, --version               output the version number
-N, --name <project_name>   specify the project's name
-O, --output [output_path]  specify the output path [./]

Examples:

$ maaperture create --name razorback -O c:/
$ maaperture create -N razorback

Maaperture on heroku

Try out a Maaperture example app on heroku: Heromaap -> http://heromaap.herokuapp.com

Maaperture collection example dsl workers.maap

collection = {
	label: 'Fulltime workers', 	//collection label
	name: 'workers',						//mongoDB collection's name
	position: 3, 							//menu position
	
	index : {
		populate: [{collection: 'jobs', key: 'job'}],
		perpage: 20,
		sortby: 'age',
		order: 'asc',
		column : [
			{	
				label: 'Name',
				name: 'name',
				type: 'String'
			},
			{	
				label: 'Field',
				name: 'job.type',
				type: 'String',
				transformation: 'type = type + \" fulltime\";'
			},
			{	
				label: 'Registration date',
				name: 'registration_date',
				type: 'Date, default: Date.now'
			},
			{	
				label: 'Turn',
				name: 'jobtype',
				type: 'String'
			},
			{	
				label: 'Age,
				name: 'age',
				type: 'Number, min: 0, max:199'
			}
		],
		query: {
			age: {$lt: 28},
			jobtype: 'fulltime'
		}
	}, //end index page
	
	show : {
		populate: [{collection: 'jobs', key: 'job'}, {collection: 'sports', key: 'sport'}],
		row : [
			{
				label: 'ID',
				name: '_id',
				type: 'ObjectId'
			},
			{	
				label: 'Name',
				name: 'name',
				type: 'String'
			},
			{	
				label: 'Field',
				name: 'job.type',
				type: 'String'
			},
			{	
				label: 'Registration Date',
				name: 'registration_date',
				type: 'Date, default: Date.now'
			},
			{	
				name: 'age',
				type: 'Number, min: 0, max:199'
			},
			{	
				label: 'Sport',
				name: 'sport.name',
				type: 'String'
			},
			{
				label: 'Hobbies',
				name: 'interest',
				type: '[String]',
				transformation: 'var result = \"\" ; \
								for(var i=0; i<interest.length; i++) \
								{ \
									if(i != 0){result += \", \"; } \
									result += interest[i]; \
								} \
								interest = result;'
			}
			
		]
	} //end show page
	
} //end collection	

//exports collection [DO NOT REMOVE]
exports.collection = collection;
1.1.0

9 years ago

1.0.30

10 years ago

1.0.23

10 years ago

1.0.22

10 years ago

1.0.21

10 years ago

1.0.20

10 years ago

1.0.19

10 years ago

1.0.18

10 years ago

1.0.17

10 years ago

1.0.16

10 years ago

1.0.15

10 years ago

1.0.14

10 years ago

1.0.13

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

0.0.1

10 years ago

1.0.0

10 years ago