Click to view this presentation.
Getting started and knowing how to structure the code in an application is one of the most difficult things for students to figure out.
Also, there might be plenty of sources available to learn about how to use a forEach
loop, but finding help on how to think like a developer and write code to implement an app's features is difficult at best.
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
require('./database'); | |
var Celebrity = require('../models/celebrity'); | |
var Movie = require('../models/movie'); | |
Promise.all([Celebrity.remove({}), Movie.remove({})]) | |
.then(function() { | |
return Celebrity.create([ | |
{name: 'Don Johnson'}, | |
{name: 'Harrison Ford'}, |