3 var db = require('../../mysqldb').db;
4 var logger = require('../logger')('app');
6 var tags = require('./tags');
9 var tags = tags.getNames();
10 var getRandomTag = function() {
11 var length = tags.length - 1;
12 return [tags[Math.floor(Math.random() * length) + 1]];
20 email: 'mario.rossi@xcally.com',
24 description: 'contact auto generated'
27 firstName: 'Giuseppe',
30 email: 'giuseppe.verdi@xcally.com',
34 description: 'contact auto generated'
40 email: 'andrea.bianco@xcally.com',
44 description: 'contact auto generated'
47 exports.create = function() {
49 .bulkCreate(contacts, {
50 ignoreDuplicates: true,
54 logger.info('Contacts have been created');
56 .catch(function(err) {
57 logger.error('Can\'t create Contacts');