Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ccckmit/road2koa

Repository files navigation

road2koa -- Koa 2 的自製範例 (非官方)

安裝

由於這是 koa2 的新版範例,因此請務必先安裝最新版本的 node.js ,至少要大於 7.6 版!

$ git clone https://github.com/ccckmit/road2koa.git
$ cd road2koa
$ npm install

文件

koa 的 @2 官方文件位於 http://koajs.com/

koa-router 的 @2 新版說明位於 https://github.com/alexmingoia/koa-router/tree/master/

關於 async/await 的用法請參考 JavaScript 好用的 async 異步函數!

關於 koa@2 的用法請參考

關於檔案存取的 mz 套件請參考 https://github.com/normalize/mz

本文範例很多修改自 Koa example, 但這些範例是 Koa 1 的版本,我們將它修改為 koa 2。

學習

請按照課程編號, (01-hello, 02-pathQuery, ..) 一個一個執行範例。

About

學習 koa 的自製 (非官方) 範例

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /