33Application Components
44==========
55#### Express
6- /lib/app.js
6+ /lib/express- app.js
77
88#### Routes
9- /lib/routes.js
9+ /lib/routes/ ** / * .js
1010
1111#### Mongo
1212Models - /lib/models/mongo/* .js
@@ -15,7 +15,7 @@ Schemas - /lib/models/mongo/schemas/*.js
1515#### Tests
1616Behavioral tests (BDD) - /test
1717Unit Tests - /unit
18- Lab - Testing Framework - [ spumko /lab] ( https://github.com/spumko /lab )
18+ Lab - Testing Framework - [ hapijs /lab] ( https://github.com/hapijs /lab )
1919
2020Running Tests
2121=============
@@ -27,47 +27,43 @@ npm test
2727
2828Granular:
2929
30- Lint: ` npm run lint `
31- All BDD: ` npm run bdd `
32- Pass additional arguments to BDD: ` npm run bdd -- -d `
33- BDD one file: ` npm run bdd -- test/path/to/file.js `
34- BDD Watch: ` npm run bdd-watch `
35- BDD Watch w/ one test file: ` npm run bdd-watch -- test/path/to/file.js `
36- All Unit: ` npm run unit `
30+ Lint: ` npm run lint `
31+ All BDD: ` npm run bdd `
32+ Pass additional arguments to BDD: ` npm run bdd -- -d `
33+ BDD one file: ` npm run bdd -- test/path/to/file.js `
34+ BDD Watch: ` npm run bdd-watch `
35+ BDD Watch w/ one test file: ` npm run bdd-watch -- test/path/to/file.js `
36+ All Unit: ` npm run unit `
3737
3838Opinions
3939========
4040#### Restful resource urls
41- Create - POST - /resources
42- Read - GET - /resources/: id
43- Update - PATCH - /resources/: id * PATCH is a partial update, PUT is a full resource update
44- Delete - DELETE - /resources/: id
41+ Create - POST - /resources
42+ Read - GET - /resources/: id
43+ Update - PATCH - /resources/: id * PATCH is a partial update, PUT is a full resource update
44+ Delete - DELETE - /resources/: id
4545
4646#### Middleware Patterns
47- Request Data validation and Middleware Flow Control - [ tjmehta/dat-middleware] ( https://github.com/tjmehta/dat-middleware )
48- Middleware Flow Control - [ tjmehta/middleware-flow] ( https://github.com/tjmehta/middleware-flow )
49- Middlewares of models are autogenerated for you
50- * Mongoose Models - /lib/middlewares/mongo/index.js - [ tjmehta/mongooseware] ( https://github.com/tjmehta/mongooseware )
51- * Class Models - /lib/middlewares/apis/index.js [ tjmehta/middlewarize] ( https://github.com/tjmehta/middlewarize )
52- Sharing the request object as a common context between middlewares allows us to make
53- asyncronous code look syncronous and avoid "callback hell"
47+
48+ Request Data validation and Middleware Flow Control - [ tjmehta/dat-middleware] ( https://github.com/tjmehta/dat-middleware )
49+ Middleware Flow Control - [ tjmehta/middleware-flow] ( https://github.com/tjmehta/middleware-flow )
50+ Middlewares of models are autogenerated for you
51+ * Mongoose Models - /lib/middlewares/mongo/index.js - [ tjmehta/mongooseware] ( https://github.com/tjmehta/mongooseware )
52+ * Class Models - /lib/middlewares/apis/index.js [ tjmehta/middlewarize] ( https://github.com/tjmehta/middlewarize )
53+ Sharing the request object as a common context between middlewares allows us to make
54+ asynchronous code look synchronous and avoid "callback hell"
55+
5456
5557#### Boom for Http Errors
56- Nice Http Error library - [ spumko /boom] ( https://github.com/spumko /boom )
58+ Nice Http Error library - [ hapijs /boom] ( https://github.com/hapijs /boom )
5759
5860
5961
6062Resource Overview
6163=================
6264Mongo Schemas - /lib/models/mongo/schemas/* .js
6365
64- Configs - Are a way of forking Infrastructure Code of a Project's Components
65-
66- Components - are application components. Ex: frontend-server, api-server, database
67- * Infrastructure code - environment definition code
68- * Application code - node.js code or etc. (github)
69-
70- Component Versions - a snapshot of infrastructure code version and application code version
66+ Context Versions - a snapshot of infrastructure code version and application code version
7167* Dockerfile v0.1.0 and api-server v0.1.0
7268* Can be built on unbuilt
7369
@@ -107,11 +103,6 @@ npm run client-version # this will update the client's version to the latest in
107103```
108104Models:
109105
110- projects (full blown project - that has multiple components)
111- - environments (subdoc)
112- - builds (collection)
113- - versions (collection) [redis v0.7, api v0.8, mongo v2.7]
114-
115106
116107A context represents a project context (like redis)
117108A version is a version of a particular context (build files, github commitHash)
@@ -144,5 +135,4 @@ Instance Page - /project/anandkumar/filibuster/master/build/:id (just like our c
144135 - create an instance from a build (create containers for all build images (versions))
145136```
146137
147- ![ Magic] ( https://s3.amazonaws.com/uploads.hipchat.com/31372/651154/nARA3Q63eW1j5WV/2014-07-04-14-45-39%20%281%29.png )
148-
138+ ![ Magic] ( https://s3.amazonaws.com/uploads.hipchat.com/31372/651154/nARA3Q63eW1j5WV/2014-07-04-14-45-39%20%281%29.png )
0 commit comments