Todo list example application using components and Express for the backend
JavaScript CSS HTML Makefile
Permalink
Failed to load latest commit information.
client implicit routing url Nov 1, 2014
server update to express 4 Nov 1, 2014
.gitignore Initial commit Nov 8, 2012
History.md update history and readme Nov 1, 2014
Makefile
Readme.md update history and readme Nov 1, 2014
app.js fix permalink issue Mar 16, 2015
component.json
index.html
package.json add comonent as dependency and avoid users to have it installed globally Mar 16, 2015

Readme.md

Todo list component example app:

Installation

Of course have component(1) installed:

$ npm install -g component

Install express for the server, and the component dependencies:

$ npm install
$ make

Implementation

In this implementation all private client-side components are located in ./client, while server related REST end-points are in ./server. The ./index.html file bootstraps the client-side, and app.js is a small Express server to power the backend.

Each client-side component in ./client defines its own dependencies, both "local" (in the ./client dir), and remote from public components that devs have created.

This is just one example of how you could structure an application. You could for example take a more traditional approach with ./models, ./controllers, and ./views etc. The entire app could be a single component, with all dependencies specified in the root ./component.json, however I recommend splitting your app into multiple as shown here, regardless of directory structure.

Components used

License

MIT