├── .gitignore ├── .travis.yml ├── 01-hello ├── README.md └── helloKoa.js ├── 02-pathQuery ├── README.md └── pathQuery.js ├── 03-streamfile ├── README.md └── streamfile.js ├── 04-router ├── README.md └── router.js ├── 05-logger ├── README.md └── logger.js ├── 06-static ├── README.md ├── public │ ├── LICENSE.html │ ├── LICENSE.txt │ └── README.md └── staticServer.js ├── 07-blog ├── README.md ├── app.js ├── lib │ └── render.js ├── test.js └── views │ ├── index.html │ ├── layout.html │ ├── list.html │ ├── new.html │ └── show.html ├── 07-blogEs6 ├── README.md ├── app.js └── app2.js ├── 08-fileupload ├── README.md ├── public │ └── upload.html └── upload.js ├── 99-middleWare └── middleware.js ├── LICENSE ├── README.md └── package.json /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/.travis.yml -------------------------------------------------------------------------------- /01-hello/README.md: -------------------------------------------------------------------------------- 1 | # 執行方法 2 | 3 | ``` 4 | $ node helloKoa 5 | ``` 6 | 7 | 然後啟動瀏覽器看 http://localhost:3000/ 8 | 9 | -------------------------------------------------------------------------------- /01-hello/helloKoa.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/01-hello/helloKoa.js -------------------------------------------------------------------------------- /02-pathQuery/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/02-pathQuery/README.md -------------------------------------------------------------------------------- /02-pathQuery/pathQuery.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/02-pathQuery/pathQuery.js -------------------------------------------------------------------------------- /03-streamfile/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/03-streamfile/README.md -------------------------------------------------------------------------------- /03-streamfile/streamfile.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/03-streamfile/streamfile.js -------------------------------------------------------------------------------- /04-router/README.md: -------------------------------------------------------------------------------- 1 | # 執行方法 2 | 3 | ``` 4 | $ node router 5 | ``` 6 | 7 | 然後啟動瀏覽器看 http://localhost:3000/mybook/chapter1.md 8 | 9 | -------------------------------------------------------------------------------- /04-router/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/04-router/router.js -------------------------------------------------------------------------------- /05-logger/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/05-logger/README.md -------------------------------------------------------------------------------- /05-logger/logger.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/05-logger/logger.js -------------------------------------------------------------------------------- /06-static/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/06-static/README.md -------------------------------------------------------------------------------- /06-static/public/LICENSE.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/06-static/public/LICENSE.html -------------------------------------------------------------------------------- /06-static/public/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/06-static/public/LICENSE.txt -------------------------------------------------------------------------------- /06-static/public/README.md: -------------------------------------------------------------------------------- 1 | # 執行方法 2 | 3 | ``` 4 | $ node helloKoa 5 | ``` 6 | 7 | 然後啟動瀏覽器看 http://localhost:3000/ 8 | 9 | -------------------------------------------------------------------------------- /06-static/staticServer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/06-static/staticServer.js -------------------------------------------------------------------------------- /07-blog/README.md: -------------------------------------------------------------------------------- 1 | # 執行方法 2 | 3 | ``` 4 | $ node app 5 | ``` 6 | 7 | 然後啟動瀏覽器看 http://localhost:3000/ 8 | 9 | 開始新增修改留言。 10 | -------------------------------------------------------------------------------- /07-blog/app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/app.js -------------------------------------------------------------------------------- /07-blog/lib/render.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/lib/render.js -------------------------------------------------------------------------------- /07-blog/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/test.js -------------------------------------------------------------------------------- /07-blog/views/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/views/index.html -------------------------------------------------------------------------------- /07-blog/views/layout.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/views/layout.html -------------------------------------------------------------------------------- /07-blog/views/list.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/views/list.html -------------------------------------------------------------------------------- /07-blog/views/new.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/views/new.html -------------------------------------------------------------------------------- /07-blog/views/show.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blog/views/show.html -------------------------------------------------------------------------------- /07-blogEs6/README.md: -------------------------------------------------------------------------------- 1 | # 執行方法 2 | 3 | ``` 4 | $ node app 5 | ``` 6 | 7 | 然後啟動瀏覽器看 http://localhost:3000/ 8 | 9 | 開始新增修改留言。 10 | -------------------------------------------------------------------------------- /07-blogEs6/app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blogEs6/app.js -------------------------------------------------------------------------------- /07-blogEs6/app2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/07-blogEs6/app2.js -------------------------------------------------------------------------------- /08-fileupload/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/08-fileupload/README.md -------------------------------------------------------------------------------- /08-fileupload/public/upload.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/08-fileupload/public/upload.html -------------------------------------------------------------------------------- /08-fileupload/upload.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/08-fileupload/upload.js -------------------------------------------------------------------------------- /99-middleWare/middleware.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/99-middleWare/middleware.js -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccckmit/road2koa/HEAD/package.json --------------------------------------------------------------------------------