17koa/koa2-demo

Name: koa2-demo

Owner: 17koa

Description: express??????Koa 2??????????koa-generator????koa2???????

Created: 2016-04-10 02:13:34.0

Updated: 2018-05-24 13:51:20.0

Pushed: 2016-05-03 10:21:02.0

Homepage: https://github.com/17koa/koa2-demo

Size: 11

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

koa2-demo

npm version Build

?????express??????Koa 2??????????koa-generator????????????????

Tech Stack
Getting Start
clone https://github.com/17koa/koa2-demo.git
oa2-demo
install
start

open in browser

http://127.0.0.1:3000/

????

???????

 bin/run

??????nodemon???,?????????(????nodemon???bin/run)

start

??pm2??

m run pm2
 start bin/run 
??koa2?3??????

Koa 2??? middleware framework, ???? 3 ???????????

??koa 2???

??view?????

koa-views is using consolidate under the hood.

List of supported engines

?????koa2???koa-views???????koa-views@next??????????????????????

jade
i -S jade

in app.js

use(views(__dirname + '/views', {
tension: 'jade'

ejs
i -S ejs

in app.js

use(views(__dirname + '/views-ejs', {
tension: 'ejs' 

????
oa2-demo git:(master) tree . -L 2

LICENSE
README.md
app.js
bin
??? run
??? www
node_modules
??? co
??? debug
??? ejs
??? jade
??? koa
??? koa-bodyparser
??? koa-convert
??? koa-json
??? koa-logger
??? koa-onerror
??? koa-router
??? koa-static
??? koa-views
??? nodemon
??? runkoa
package.json
public
??? images
??? javascripts
??? stylesheets
routes
??? index.js
??? users.js
views
??? error.jade
??? index.jade
??? layout.jade
views-ejs
??? error.ejs
??? index.ejs

irectories, 13 files

??

??

?????express????????koa-generator

?????babel + koa2????Minimal koa v2 boilerplate.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.