From 8566330c98eb5bbe82241ed4601cf42c60d106f9 Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Tue, 21 Jun 2011 10:40:46 -0600 Subject: [PATCH] proposed server organization --- ORGANIZATION.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ORGANIZATION.md diff --git a/ORGANIZATION.md b/ORGANIZATION.md new file mode 100644 index 000000000..83f11a909 --- /dev/null +++ b/ORGANIZATION.md @@ -0,0 +1,18 @@ +Several node.js servers are implemented in this repostiory, each is +implemented on top of the [express](http://expressjs.com) framework +and should obey roughly the following directory structure: + + * `var/` - a demand created directory with ephemeral files generated + during the run (keys, logs, etc). + * `static/` - files served verbatim without any substitution nor server + side logic in them + * `lib/` - javascript modules. + * `lib/app.js` application "entry point", exposes a single function `exports.setup` + that takes a handle to an express server as an argument and sets up routes + or associates middleware to it. + * `views/` - express views, served before `static/` (if present) + * `tests/` - tests written using [vows](http://vowsjs.org) + * `tests/run.js` - a "run all" script to run all tests + * `run.js` - script to run a standalone (production) node.js server - typically bound + against a well known localhost port. + -- GitLab