June 2014
Intermediate to advanced
696 pages
38h 52m
English
With the model defined, you can begin implementing the web application server. Listing 29.2 implements the Express server for the web application. This code should be familiar to you. It includes the express and mongoose libraries and connects to the MongoDB words database via Mongoose.
Notice that there is a require('./models/word_model.js') statement for the model definition to build the Schema object within Mongoose. Also, the ./rich_ui_routes files initialize the routes for the server before listening on port 80.
Listing 29.2 rich_ui_server.js: Implementing the web application server using Express and connecting to MongoDB
01 var express = require('express');02 var bodyParser ...
Read now
Unlock full access