koa-feather
A lightweight web framework based on koa.
Last updated 4 years ago by wxnet .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install koa-feather 
SYNC missed versions from official npm registry.

feather

A lightweight web framework based on koa.

快速开始

app.js

var feather = require('koa-feather');

var app = feather();

router.get('/', function* (next){
	yield this.render('index',{});
});

路由设置

https://github.com/alexmingoia/koa-router

  • router.get
  • router.post

模版引擎

feather-viewskoa-views的基础上做了简单的修改,以支持模版的layout。

router.get('/u/:id', function* (next) {
	yield this.render('user', {
		'user': this.params.id
	});
});

views/user.html

{{user}}

views/layout.html

{{>yield}}

Session配置

在项目的package.json中添加配置信息

  "session": {
	  "keys": "your secret key"
  }

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

23 Versions

  • 1.0.0                                ...           4 years ago
  • 0.0.22                                ...           4 years ago
  • 0.0.21                                ...           4 years ago
  • 0.0.20                                ...           4 years ago
  • 0.0.19                                ...           4 years ago
  • 0.0.18                                ...           4 years ago
  • 0.0.17                                ...           4 years ago
  • 0.0.16                                ...           4 years ago
  • 0.0.15                                ...           5 years ago
  • 0.0.14                                ...           5 years ago
  • 0.0.13                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.11                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (7)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |