Production application boilerplate for Vue.js & Koa.js
APACHE-2.0 License
Production application boilerplate for Vue and Koa, batteries included:
npm start
- start Koa and Webpack server simultaneously with hot reload supports in foreground (default port 3000
), all consequent requests prefixed by /v1
will be proxied to Koa automatically.npm run start:staging
- compile front end source code using etc/webpack.staging.js
into folder dist
then start Koa server via PM2
with static assets supports.npm run stop:staging
- stop Koa server via PM2
.npm run start:release
- compile front end source code using etc/webpack.release.js
into folder dist
then start Koa server via PM2
.npm run stop:release
- stop Koa server via PM2
.develop
, staging
and release
settings profiles.configurable prefixed server endpoint (/v1
by default).
intelligent/automatic routes registration.
Module created under apps
folder with routes defined in index.js
will be registered onto server router automatically.
// OPTIONAL prefix definition, by default, system will register the module name as its routing prefix.
// `prefix -> false` will disable prefix for this module.
export const prefix = '/<module-prefix>';
import * as mw from './middleware';
import * as views from './views';
export default {
'GET /', views.list,
'GET /:key', views.get,
'POST /', [mw.acl, views.create],
'PUT /:key', views.update,
'DELETE /:key', views.delete,
}
dotenv
based multi settings profiles at server side.