随笔分类 - MEAN Stack
摘要:Currently, the server.js is going way too long. In the real world application, it is likely that we are going to deal with more routers, whichi means ...
阅读全文
摘要:For server.js, we update the code by using route instance. By using this, we can remove some duplicate code.For example:app.get('/people', function(re...
阅读全文
摘要:Front-end changes:app.js: Uinsg $resource/** * Created by Answer1215 on 12/9/2014. */'use strict';function MainCtrl(People) { var vm = this; vm....
阅读全文
摘要:The app structure:Front-end: app.js/** * Created by Answer1215 on 12/9/2014. */'use strict';function MainCtrl(PeopleService) { var vm = this; vm...
阅读全文
摘要:Mongoose allows you to easily select resources by ID from your MongoDB. This is an important aspect to creating an API.Server.js'use strict';var expre...
阅读全文
摘要:Learn how to import data into your MongoDB and then use Express to serve a simple Node.js API.Import data into MongoDB:For exmaple, you have an data.j...
阅读全文
摘要:Using WebStrom can easily debug the Node applcation.For example, we have an Node+Express application.server.js:/** * Created by Answer1215 on 12/9/201...
阅读全文
摘要:npm install mongoose --save-devnpm install express --save-devbower install angularnpm install cors --save-devnpm install body-parser --save-devindex.h...
阅读全文