1.1.0 • Published 11 years ago
maaperture v1.1.0
Maaperture
MongoDB as an Admin Platform
Copyright (c) 2014, Aperture Software
All rights reserved.
Install from npm:
npm install -g maapertureUsage:
maaperture <command> [options]Commands:
create                 		create and initialize a new empty projectOptions:
-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 razorbackMaaperture 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
11 years ago
1.0.30
11 years ago
1.0.23
11 years ago
1.0.22
11 years ago
1.0.21
11 years ago
1.0.20
11 years ago
1.0.19
11 years ago
1.0.18
11 years ago
1.0.17
11 years ago
1.0.16
11 years ago
1.0.15
11 years ago
1.0.14
11 years ago
1.0.13
11 years ago
1.0.12
11 years ago
1.0.11
11 years ago
1.0.10
11 years ago
1.0.9
11 years ago
1.0.8
11 years ago
1.0.7
11 years ago
1.0.6
11 years ago
1.0.5
11 years ago
1.0.4
11 years ago
1.0.3
11 years ago
1.0.2
11 years ago
1.0.1
11 years ago
0.0.1
12 years ago
1.0.0
12 years ago