Skip to content

A MVC web application Node framework OO Based using Babel

Notifications You must be signed in to change notification settings

dayvsonlima/crush.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crush.js

A MVC web application Node framework OO Based using Babel

Router system

// app/routes.js
export default function Routes() {
  this.root('photos#index')

  this.resources('photos')
}

Friendly controller syntax

// app/controllers/photos.js
import { Controller } from 'crush'

class Photos extends Controller {
  index() {
    this.render('show')
  }
}

export default Photos

Create APIs easily

// app/views/photos/show.js
export default jbuilder.encode((json) => {
  json.set('photo', (json) => {
    json.extract(photo, 'id', 'name', 'url')
  })
})
// output: {"photo":{"id":1,"name":"my photo","url":"localhost:9000/photos/media/my_photo.png"}}

About

A MVC web application Node framework OO Based using Babel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published