1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-12 19:41:52 +00:00

Remove things from seed.js

This commit is contained in:
Mumshad Mannambeth 2017-07-07 12:24:57 -04:00
parent ecad9eed3f
commit a81a72ed3c

View file

@ -4,47 +4,11 @@
*/
'use strict';
import Thing from '../api/thing/thing.model';
import User from '../api/user/user.model';
import config from './environment/';
export default function seedDatabaseIfNeeded() {
if(config.seedDB) {
Thing.find({}).remove()
.then(() => {
let thing = Thing.create({
name: 'Development Tools',
info: 'Integration with popular tools such as Webpack, Gulp, Babel, TypeScript, Karma, '
+ 'Mocha, ESLint, Node Inspector, Livereload, Protractor, Pug, '
+ 'Stylus, Sass, and Less.'
}, {
name: 'Server and Client integration',
info: 'Built with a powerful and fun stack: MongoDB, Express, '
+ 'AngularJS, and Node.'
}, {
name: 'Smart Build System',
info: 'Build system ignores `spec` files, allowing you to keep '
+ 'tests alongside code. Automatic injection of scripts and '
+ 'styles into your index.html'
}, {
name: 'Modular Structure',
info: 'Best practice client and server structures allow for more '
+ 'code reusability and maximum scalability'
}, {
name: 'Optimized Build',
info: 'Build process packs up your templates as a single JavaScript '
+ 'payload, minifies your scripts/css/images, and rewrites asset '
+ 'names for caching.'
}, {
name: 'Deployment Ready',
info: 'Easily deploy your app to Heroku or Openshift with the heroku '
+ 'and openshift subgenerators'
});
return thing;
})
.then(() => console.log('finished populating things'))
.catch(err => console.log('error populating things', err));
User.find({}).remove()
.then(() => {
User.create({