Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

koa-generator支持nunjucks

$
0
0

koa-generator是和express-generator类似的生成器,主要生成koa 2.x项目骨架

安装

npm i -g koa-generator

创建项目

koa2 -n hellonunjucks     

   create : hellonunjucks
   create : hellonunjucks/package.json
   create : hellonunjucks/app.js
   create : hellonunjucks/public
   create : hellonunjucks/public/javascripts
   create : hellonunjucks/public/images
   create : hellonunjucks/public/stylesheets
   create : hellonunjucks/public/stylesheets/style.css
   create : hellonunjucks/routes
   create : hellonunjucks/routes/index.js
   create : hellonunjucks/routes/users.js
   create : hellonunjucks/views
   create : hellonunjucks/views/index.nunjucks
   create : hellonunjucks/views/layout.nunjucks
   create : hellonunjucks/views/error.nunjucks
   create : hellonunjucks/bin
   create : hellonunjucks/bin/www

   install dependencies:
     $ cd hellonunjucks && npm install

   run the app:
     $ DEBUG=hellonunjucks:* npm start

安装依赖

$ cd  hellonunjucks 
$ npm i

启动

$ npm start

Viewing all articles
Browse latest Browse all 14821

Trending Articles