express-orm-mvc
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "express-orm-mvc", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Express + ORM MVC", | ||
@@ -27,4 +27,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"express": "^3.4.8", | ||
"orm": "^2.1.3", | ||
"express": "^4.0.0", | ||
"orm": "^2.1.5", | ||
"callsite": "^1.0.0" | ||
@@ -37,6 +37,9 @@ }, | ||
"request": "^2.34.0", | ||
"coveralls": "^2.8.0", | ||
"orm-2.1.3": "^2.1.3", | ||
"coveralls": "^2.8.0", | ||
"istanbul": "^0.2.6" | ||
"istanbul": "^0.2.6", | ||
"errorhandler": "^1.0.0", | ||
"morgan": "^1.0.0", | ||
"body-parser": "^1.0.2" | ||
} | ||
} |
@@ -37,4 +37,4 @@ express-orm-mvc | ||
* [Express](https://github.com/visionmedia/express) v3.4.8 | ||
* [ORM](https://github.com/dresende/node-orm2) v2.1.3 | ||
* [Express](https://github.com/visionmedia/express) ^4.0.0 | ||
* [ORM](https://github.com/dresende/node-orm2) ^2.1.5 | ||
@@ -46,9 +46,12 @@ You can specify those dependencies version by option, please refer to [this](#options) | ||
npm install express-orm-mvc --save | ||
Database package | ||
npm install <your database package> | ||
//example | ||
npm install mysql | ||
Refer to ORM document [Connecting to Database](https://github.com/dresende/node-orm2/wiki/Connecting-to-Database) | ||
##App structure | ||
@@ -66,3 +69,3 @@ | ||
app.js -- root | ||
Please check [example](example) folder | ||
@@ -93,3 +96,3 @@ | ||
//define your orm model here | ||
}; | ||
}; | ||
``` | ||
@@ -100,3 +103,3 @@ | ||
models/post.js | ||
```js | ||
@@ -113,2 +116,12 @@ module.exports = function (orm, db) { | ||
####Note: | ||
``express-orm-mvc`` loads models by alphabet order. | ||
For example ``comment`` model has one ``post`` (many-to-one relationship) as ``post_id`` field, so ``post`` model must be loaded before ``comment`` model. | ||
Solution: name the file models name as ``0_post.js`` and ``comment.js``. | ||
You can check [example](example) | ||
###Controllers | ||
@@ -127,3 +140,3 @@ | ||
controllers/post.js | ||
```js | ||
@@ -154,3 +167,3 @@ module.exports = { | ||
config/settings.js | ||
A settings file should be like this | ||
@@ -211,5 +224,5 @@ | ||
###Express config | ||
config/express.js | ||
A express config file should be like this | ||
@@ -227,3 +240,3 @@ | ||
module.exports = function(app, express) { | ||
app.set('title', 'testing'); | ||
app.set('title', 'testing'); | ||
app.set('views', '../views'); | ||
@@ -249,3 +262,3 @@ app.set('view engine', 'ejs'); | ||
config/orm.js | ||
A orm config file should be like this | ||
@@ -274,3 +287,3 @@ | ||
config/routes.js | ||
A routes config file should be like this | ||
@@ -300,3 +313,3 @@ | ||
path: __dirname, //default: auto detect | ||
express: require('express'), //specify your express version | ||
express: require('express'), //specify your express version | ||
orm: require('orm') //specify your orm version | ||
@@ -346,7 +359,2 @@ }, callback); | ||
}); | ||
``` | ||
##Todo | ||
* Express 4 testing | ||
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ddo/express-orm-mvc/trend.png)](https://bitdeli.com/free "Bitdeli Badge") | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14586
346
10
+ Addedarray-flatten@1.1.1(transitive)
+ Addedbody-parser@1.20.3(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcontent-disposition@0.5.4(transitive)
+ Addedcookie@0.7.1(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addedencodeurl@1.0.22.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedexpress@4.21.1(transitive)
+ Addedfinalhandler@1.3.1(transitive)
+ Addedforwarded@0.2.0(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedipaddr.js@1.9.1(transitive)
+ Addedmerge-descriptors@1.0.3(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedpath-to-regexp@0.1.10(transitive)
+ Addedproxy-addr@2.0.7(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedraw-body@2.5.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsend@0.19.0(transitive)
+ Addedserve-static@1.16.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedutils-merge@1.0.1(transitive)
- Removedaccepts@1.2.13(transitive)
- Removedbase64-url@1.2.1(transitive)
- Removedbasic-auth@1.0.4(transitive)
- Removedbasic-auth-connect@1.0.0(transitive)
- Removedbatch@0.5.3(transitive)
- Removedbody-parser@1.13.3(transitive)
- Removedbytes@2.1.02.4.0(transitive)
- Removedcommander@2.6.0(transitive)
- Removedcompressible@2.0.18(transitive)
- Removedcompression@1.5.2(transitive)
- Removedconnect@2.30.2(transitive)
- Removedconnect-timeout@1.6.2(transitive)
- Removedcontent-disposition@0.5.0(transitive)
- Removedcookie@0.1.3(transitive)
- Removedcookie-parser@1.3.5(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcrc@3.3.0(transitive)
- Removedcsrf@3.0.6(transitive)
- Removedcsurf@1.8.3(transitive)
- Removeddebug@2.2.0(transitive)
- Removeddepd@1.0.11.1.2(transitive)
- Removeddestroy@1.0.31.0.4(transitive)
- Removederrorhandler@1.4.3(transitive)
- Removedescape-html@1.0.2(transitive)
- Removedetag@1.7.0(transitive)
- Removedexpress@3.21.2(transitive)
- Removedexpress-session@1.11.3(transitive)
- Removedfinalhandler@0.4.0(transitive)
- Removedforwarded@0.1.2(transitive)
- Removedfresh@0.3.0(transitive)
- Removedhttp-errors@1.3.1(transitive)
- Removediconv-lite@0.4.110.4.13(transitive)
- Removedipaddr.js@1.0.5(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmerge-descriptors@1.0.0(transitive)
- Removedmethod-override@2.3.10(transitive)
- Removedmime@1.3.4(transitive)
- Removedmime-db@1.53.0(transitive)
- Removedminimist@0.0.8(transitive)
- Removedmkdirp@0.5.1(transitive)
- Removedmorgan@1.6.1(transitive)
- Removedms@0.7.10.7.2(transitive)
- Removedmultiparty@3.3.2(transitive)
- Removednegotiator@0.5.3(transitive)
- Removedon-finished@2.3.0(transitive)
- Removedon-headers@1.0.2(transitive)
- Removedpause@0.1.0(transitive)
- Removedproxy-addr@1.0.10(transitive)
- Removedqs@4.0.0(transitive)
- Removedrandom-bytes@1.0.0(transitive)
- Removedrange-parser@1.0.3(transitive)
- Removedraw-body@2.1.7(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedresponse-time@2.3.3(transitive)
- Removedrndm@1.2.0(transitive)
- Removedsend@0.13.00.13.2(transitive)
- Removedserve-favicon@2.3.2(transitive)
- Removedserve-index@1.7.3(transitive)
- Removedserve-static@1.10.3(transitive)
- Removedstatuses@1.2.11.5.0(transitive)
- Removedstream-counter@0.2.0(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedtsscmp@1.0.5(transitive)
- Removeduid-safe@2.0.02.1.4(transitive)
- Removedutils-merge@1.0.0(transitive)
- Removedvary@1.0.1(transitive)
- Removedvhost@3.0.2(transitive)
Updatedexpress@^4.0.0
Updatedorm@^2.1.5