上一页 1 ··· 480 481 482 483 484 485 486 487 488 ··· 499 下一页
摘要: With a node package manager's (npm) package.jsonscriptproperty, you can preconfigure common tasks like running unit tests withnpm $SCRIPT_NAME.package... 阅读全文
posted @ 2014-12-09 23:42 Zhentiw 阅读(797) 评论(0) 推荐(0)
摘要: CoomonJS modules provide a clean syntax for importing dependencies. This lesson will take a look at the basics of using CommonJS modules.app.jsvar dep... 阅读全文
posted @ 2014-12-09 04:58 Zhentiw 阅读(213) 评论(0) 推荐(0)
摘要: npm init:For create package.json file which will recode the dependence.npm install:You can also write like:npm i This is a shortcut way to write npm i... 阅读全文
posted @ 2014-12-09 04:07 Zhentiw 阅读(1276) 评论(0) 推荐(0)
摘要: Angular overrides quite a few existing HTML elements and attributes. This can be a useful technique in our own applications. We will build a directive... 阅读全文
posted @ 2014-12-09 01:30 Zhentiw 阅读(304) 评论(0) 推荐(0)
摘要: Simple Redis CommandsLet's start practicing using the redis key-value store from our node application.Require theredismodule and assign it to a variab... 阅读全文
posted @ 2014-12-06 17:57 Zhentiw 阅读(717) 评论(0) 推荐(0)
摘要: Using a Router InstanceLet's refactorapp.jsto use aRouterobject.Create a new router object and assign it to theroutervariable.var router = express.Rou... 阅读全文
posted @ 2014-12-05 00:08 Zhentiw 阅读(637) 评论(0) 推荐(0)
摘要: Route InstanceLet's rewrite our cities routes using a Route Instance.Create a newRoute Instancefor the'/cities'URL path and assign it to thecitiesRout... 阅读全文
posted @ 2014-12-04 23:34 Zhentiw 阅读(430) 评论(0) 推荐(0)
摘要: Response BodyWhat would the response body be set to on aDELETErequest to/cities/DoesNotExist? Here'sthe linkto thesendStatusfunction source code if yo... 阅读全文
posted @ 2014-12-04 18:09 Zhentiw 阅读(532) 评论(0) 推荐(0)
摘要: Parser SetupAssume thebody-parsermiddleware is installed. Now, let's use it in our Express application.npm install body-parserRequire thebody-parsernp... 阅读全文
posted @ 2014-12-04 17:55 Zhentiw 阅读(984) 评论(0) 推荐(0)
摘要: Flexible RoutesOur current route only works when the city name argument matches exactly the properties in thecitiesobject. This is a problem. We need ... 阅读全文
posted @ 2014-12-04 17:30 Zhentiw 阅读(468) 评论(0) 推荐(0)
上一页 1 ··· 480 481 482 483 484 485 486 487 488 ··· 499 下一页