jazz jss
It’s a simple rapid prototyping JSS framework
Install
Usage
in shell
jazz new example
cd example
jazz generate scaffold user firstName:string lastName:string age:integer
add route to config/routes.js
Jazz.Route.draw(
{
'' : 'users_controller#index',
'/' : 'users_controller#index',
'/users' : 'users_controller#index',
'/users/:user_id' : 'users_controller#show',
'/users/:user_id/edit' : 'users_controller#edit',
'/users/make' : 'users_controller#make'
}
);
open db/create/create_users.js and add default values
var CreateUser = Jazz.Db.create(
{
columns: {
firstName: {
value: 'firstname',
type: 'string'
},
lastName: {
value: 'lastname',
type: 'string'
},
age: {
value: '23',
type: 'integer'
}
}
}
);
create_users = new CreateUser;
open db/fixtures/users.js and uncomment
_.times(
10,
function(){
new User({}).save();
}
);
in shell type
jazz server
openup your browser and navigate to
http://127.0.0.1:9292/index.html
Todo
Coming soon
Credits
Copyright © 2011 Florian Schade. All rights reserved.