August 2016
Intermediate to advanced
376 pages
6h 33m
English
We will follow the same generator code pattern that the generator suggests; one of the advantages of using this generator is that we already have the MVC pattern at our disposal.
Remember, you can download the example files from the Packpub website, or directly from the GitHub book repository.
books.js inside the controllers folder.book.js file: var express = require('express'), router = express.Router(), schema = require('../models/book'), Picture = schema.models.Picture, cloudinary = require('cloudinary').v2, fs = require('fs'), multipart = require('connect-multiparty'), multipartMiddleware = multipart(); module.exports = function (app) { app.use('/', router); }; ...