https://github.com/jimzhan/prototype.js
Production application boilerplate for Vue.js & Koa.js
https://github.com/jimzhan/prototype.js
boilerplate koajs prototype vuejs webpack
Last synced: about 1 year ago
JSON representation
Production application boilerplate for Vue.js & Koa.js
- Host: GitHub
- URL: https://github.com/jimzhan/prototype.js
- Owner: jimzhan
- License: apache-2.0
- Created: 2017-01-06T12:40:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-30T17:20:16.000Z (about 9 years ago)
- Last Synced: 2025-04-09T18:04:50.678Z (about 1 year ago)
- Topics: boilerplate, koajs, prototype, vuejs, webpack
- Language: JavaScript
- Homepage:
- Size: 172 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Vue.js :revolving_hearts: Koa.js
================================
[](https://david-dm.org/jimzhan/prototype.js.svg)
[](https://travis-ci.org/jimzhan/prototype.js)
[](https://www.npmjs.com/package/prototype.js)
[](https://www.npmjs.com/package/prototype.js)
Production application boilerplate for Vue and Koa, batteries included:
+ ES6 + Babel
+ [ESLint](https://github.com/eslint/eslint) with the [Airbnb JavaScript](https://github.com/airbnb/javascript) rules.
+ [Mocha](https://github.com/mochajs/mocha) Unit testing and coverage with [Chai](https://github.com/chaijs/chai) assertion framework.
+ [Nightwatch](https://github.com/nightwatchjs/nightwatch) E2E UI automated testing framework.
+ [Editorconfig](http://editorconfig.org/) Consistent coding styles formatter.
+ [Yarn](https://yarnpkg.com/en/) Dependency management.
+ [Vue.js](https://github.com/vuejs/vue) Progressive frontend framework.
+ [Koa.js](https://github.com/koajs/koa) Next generation web framework.
+ [Dotenv](https://github.com/motdotla/dotenv) Production settings profile solution.
+ [Foundation](http://foundation.zurb.com/) Framework Integration with common UI components on Vue.
+ NPM scripts for common operations.
## Key NPM Scripts
* `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`.
## Client
* webpack supports with `develop`, `staging` and `release` settings profiles.
## Server
* 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.
```javscript
// 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 = '/';
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,
}
```
TODOs
=====
- [x] ESLint rules supports.
- [x] webpack/webpack-dev-server support.
- [x] NPM scripts for common operations.
- [x] multiple webpack settings profiles.
- [x] `dotenv` based multi settings profiles at server side.
- [x] Grouped routing system.
- [x] unit test integration
- [x] hot reload koa server
- [ ] e2e test integration