A Koa.js Application Boilerplate
npm install koan
|2||downloads in the last day|
|10||downloads in the last week|
|72||downloads in the last month|
|Version||0.0.9 last updated 17 days ago|
|Keywords||koa, koajs, koa.js, web, web-framework, framework, mvc, app, application, generators, es6, harmony, koan, koanjs, koan.js, boilerplate|
|Dependencies (18)||koa, co-views, koa-logger, koa-route, koa-static, lodash, optimist, fs-extra, koa-response-time, koa-compress, koa-ratelimit, redis, ejs, koa-session, koa-compose, koa-etag, koa-conditional-get, koan-errors|
Koan.js: A Koa.js Application Boilerplate
What is Koa.js?
Koa.js is a modern Web framework designed by the team behind Express.js. While being lean and minimalistic, it has all the functionality needed in order to create robust and powerful Web-applications.
So why do we need Koan.js?
An average Web-application often contains some common components (e.g. routing, public folder, view rendering, etc.), and Koan.js provides you with a boilerplate having many of these components already in place. Also, it proposes a way to organize application features.
Is it the right way to build Web-applications with Koa.js?
It's just one of many, many possible ways. The beauty of Koa.js (or Express.js) is in its incredible flexibility giving you freedom to organize your application however you feel is right. But if you want just save your time and go with an existing solution, Koan.js definitely worth a shot.
sudo npm install -g koan
koan new myappcreates a subfolder
myappin the current directory with the new application boilerplate in it.
npm installto install dependencies.
- Start your application with
koan start(or just usual
- Run tests with
- Autotest with
npm run autotest.
- Add or disable middleware your new Koan.js application requires in
- Configure your routes in
- Set other application options in
config/options.js, they will be available during runtime via
- Koa.js as the main application framework,
- Co-views for template rendering,
- Koa-logger as logger middleware,
- Koa-route for routing,
- Koa-static to serve static assets,
- Lodash utilities,
- Optimist for option parsing,
- Fs-extra for recursive file system operations.
- Koa-response-time for X-Response-Time header,
- Koa-compress to enable response compression,
- Koa-ratelimit for rate limiting,
- Koa-session for session support,
- Koa-compose to compose middleware,
- Koa-etag for ETag support,
- Redis for temporary storage,
- Ejs for templating.
- are welcome;
- should be tested;
- should follow Koa.js coding style.
Copyright (c) 2013-2014 Ruslan Bredikhin