Code Examples for my Blog Post: Angular Starter Project with Basic Routing
The full Github repo can be found here: github.com/kevinchisholm/video-code-examples/tree/master/angular/starter-projects/routing-basic
- Clone this repo:
Code Examples for my Blog Post: How to Create a Node.js Web Server with Amazon EC2
Code Examples for my Blog Post: Create a Node.js Websocket Server in Five Minutes
The full Github repo can be found here: https://github.com/kevinchisholm/video-code-examples/tree/master/node/websocket-basic-server
- Clone this repo:
Code Examples for my Blog Post: How to Use the jQuery replaceWith Method
Code Examples for my Blog Post: Why is a JavaScript Array’s Length Property Always One Higher Than the Value of the Last Element’s Index?
Code Examples for my Blog Post: Two Ways to Dynamically Append an Element to a JavaScript Array
Code Examples for my Blog Post: Iterating Over a DOM Collection with the jQuery.each Method
Code Examples for my Blog Post: Node File Uploads with Multer
The full Github repo can be found here: github.com/kevinchisholm/video-code-examples/tree/master/node/file-uploads-with-multer
- Clone this repo:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var mongoose = require('mongoose'), | |
Book = mongoose.model('Books'); | |
exports.create_book = function(req, res) { | |
var new_book = new Book(req.body); | |
new_book.save(function(err, book) { | |
if (err) | |
res.send(err); |