官术网_书友最值得收藏!

Adding the application code

Now, let's write the simple application code to test things out. This app is going to basically connect to our locally running MongoDB server, insert a few records as seed data, and then provide the output on whether or not the data was inserted properly into MongoDB. You can download a Gist of the code via this URL: http://bit.ly/1JpT8QL.

Using your editor of choice, create a new file named app.js and save it to the application root, which is the testapp folder. Just copy the content of the preceding Gist on to the app.js file.

主站蜘蛛池模板: 丁青县| 宝清县| 巴彦县| 仪陇县| 邵东县| 莆田市| 兰州市| 固原市| 义乌市| 兴义市| 屏边| 扶绥县| 崇礼县| 太仓市| 梁山县| 双鸭山市| 洞头县| 突泉县| 丰镇市| 若羌县| 广宁县| 武宁县| 平度市| 常德市| 肃宁县| 兴山县| 社旗县| 阿克陶县| 北海市| 疏勒县| 塘沽区| 赣州市| 绩溪县| 铁岭市| 武鸣县| 涟源市| 柘城县| 洛宁县| 龙井市| 武汉市| 商丘市|