Yet another mongoose admin
Awesome node-mongoose admin, with love from LastRoom at México to you.
Technologies
Server | Client |
---|---|
express | Bootstrap |
mongoose | jQuery |
swig | html5shiv |
underscore | responseJS |
async | |
execSync |
Screenshots
Try the demo at: http://yamajs.com/admin
Email: demo@lastroom.mx
Password: password
How to install
$ npm install -g yama
Initialize your project admin database
$ yama init --database=whatever
This command ask for the host, database, port, user, password, email and password.
If you need help
$ yama --help
How to implements
Finally just write the next lines:
On your project main file add the next lines
//Initialize express appvar express = ;var app = ; //Initialize connection to mongovar mongoose = ;mongoose; ... var admin = ; // Run admin with optionsadmin; ...//Run app at any available portapp;
Add models to admin
var admin = ; admin;
Functions
init
Run the admin site with options
Arguments
- path: process.cwd(),
- express: Express app initialized
- mongoose: Mongoose connection app
- models: Array with the routes where models are allocated
- url: url for the admin site
- templates: Admin site templates, argument optional
- media: Admin site statics, argument optional
add
Add an model description to the admin site
Arguments
- path
- modelName
- schema
- options
Widgets
- select [aditional attributes: multiple as true or false]
- text
- textarea
- checkbox
- radio
- csv
Ready go to your /admin and that's all
What's next?
Three features i think would be awesome for integrate by default on yama are:
- Search filters by field
- Graphics for lists
- Order lists
- Download lists as CSV
Questions?
Please write an issue at https://github.com/lastroom/yama/issues
Inspired and based on drywal.