Boilerplate for a Koa backend and a frontend built using component with emphasis on using light-weight dependencies.
The project incorporates following "features":
- LiveReload via koa-livereload and LiveReload server via tiny-lr and watch
- Automatic component client build via component-koa when in development env (works well with LiveReload)
- Automatic Koa reloading on server-side changes via node-supervisor
Server includes following examples:
- Development environment with LiveReload and automatic reload on backend changes
- Routing via koa-route
- A * style server that always serves the client side code when no other files/endpoints are hit (used for client side routing without fragments)
- Tests using mocha
Client includes following examples:
- A component consisting purely of CSS (by coincidence, purecss)
- Routing and "page module loading" via page.js
- Including templates via domify
- Template/view /w bindings via reactive
Inspired by and in part adapted from projects such as boilerplate-koa, component.io and others.
- Node >= 0.11.9
- NPM
$ ./setup.sh
Installing tools
-- Component
-- Supervisor
-- Mocha
Installing dependencies
$ ./devel.sh
Installing dependencies
Setting environment to development
Starting application
(...)
Starting server in development mode
Application listening on port 9000.
- Hit setup.cmd (may need to be run as administrator as it contains npm global installs)
- Hit devel.cmd
- Success
./setup.sh
./devel.sh
- Success