An open API service indexing awesome lists of open source software.

https://github.com/dayvsonlima/crush.js

A MVC web application Node framework OO Based using Babel
https://github.com/dayvsonlima/crush.js

framework nodejs

Last synced: 12 months ago
JSON representation

A MVC web application Node framework OO Based using Babel

Awesome Lists containing this project

README

          

Crush.js
=================

A MVC web application Node framework OO Based using Babel

## Router system

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

this.resources('photos')
}
```

## Friendly controller syntax

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

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

export default Photos
```

## Create APIs easily

```javascript
// 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"}}
```