README.md

Sharing RequireJS modules

This example shows how to reuse code between the client and server. A typical use case would be to use the same validation logic for your models on both sides.

Feel free to use it as a basic template for your applications.

Project structure

This backbone application is divided into a couple of AMD modules. A special shared module is used inside the node.js server.
It is possible to test all modules using mocha and expect.js. (Examples included)

The Backbone app is inside the 'client' folder.
The server is inside the 'server' folder (obviously...).
Any module which should be shared between client and server is in the 'shared' folder and has to start with the amdefine wrapper.
The minified client app is in the 'client-build' folder. This folder gets deleted on every build.