passing off hacker news clone to Nathan and his pair
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
require('dotenv').load();
|
||||
var Challenge = require('../models/Challenge.js'),
|
||||
Bonfire = require('../models/Bonfire.js'),
|
||||
Comment = require('../models/Comment.js'),
|
||||
Story = require('../models/Story.js'),
|
||||
Courseware = require('../models/Courseware.js'),
|
||||
mongoose = require('mongoose'),
|
||||
secrets = require('../config/secrets'),
|
||||
challenges = require('./challenges.json'),
|
||||
coursewares = require('./coursewares.json'),
|
||||
stories = require('./stories.json'),
|
||||
bonfires = require('./bonfires.json');
|
||||
|
||||
mongoose.connect(secrets.db);
|
||||
|
||||
var counter = 0;
|
||||
var offerings = 3;
|
||||
var offerings = 4;
|
||||
|
||||
var CompletionMonitor = function() {
|
||||
counter++;
|
||||
@@ -73,4 +76,21 @@ Courseware.remove({}, function(err, data) {
|
||||
CompletionMonitor();
|
||||
});
|
||||
console.log('coursewares');
|
||||
});
|
||||
|
||||
Story.remove({}, function(err, data) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
console.log('Deleted ', data);
|
||||
}
|
||||
Story.create(coursewares, function(err, data) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
console.log('Saved ', data);
|
||||
}
|
||||
CompletionMonitor();
|
||||
});
|
||||
console.log('stories');
|
||||
});
|
Reference in New Issue
Block a user