0.1.5 • Published 5 years ago

rouy v0.1.5

Weekly downloads
10
License
MIT
Repository
github
Last release
5 years ago

A 2.5kb web framework 👩‍🌾

Rouy is simple and flexible web framework for NODE JS, heavily inspired by React 🔥 🚀

Example Code:

const Rouy = require('rouy')
const ParseQuery = require('rouy/modules/ParseQuery')
class UserInfo extends Rouy.Controller {
  async handler() {
    return { vuon_hong_ngay_xua: 'da ua tan' }
  }
  match() {
    return this.test('/users/:user')
  }
}

class Otherwise extends Rouy.Controller {
  handler(req, res) {
    return '404'
  }
}
// functional
function HelloWorld(req, res) {
  if (!this.test('/hello-world')) {
    return this.next()
  }
  return 'hello world, 2019'
}
// functional 2
function HelloWorld2(req, res) {
  return 'hello world, 2020'
}
HelloWorld2.match = '/hello-world'

Rouy.listen([ParseQuery(), UserInfo, Otherwise, HelloWorld, HelloWorld2], 3000)
0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago