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

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.

主站蜘蛛池模板: 湾仔区| 大邑县| 临高县| 丹凤县| 马龙县| 湖南省| 青海省| 六枝特区| 黄平县| 乐陵市| 塘沽区| 信阳市| 山东| 宜春市| 出国| 都昌县| 体育| 桦南县| 浠水县| 泾源县| 曲沃县| 泰安市| 松潘县| 迭部县| 蒲城县| 阳泉市| 宁安市| 新乡市| 民权县| 焦作市| 临泉县| 漳州市| 金寨县| 惠东县| 白玉县| 万安县| 平山县| 旺苍县| 安化县| 石狮市| 本溪市|