Vulcan/packages/nova-core/lib/server/start.js

27 lines
678 B
JavaScript
Raw Normal View History

2016-08-08 11:18:21 +09:00
import Telescope from 'meteor/nova:lib';
2016-05-20 09:59:33 +09:00
import {Inject} from 'meteor/meteorhacks:inject-initial';
const Events = new Mongo.Collection('events');
2016-05-20 09:59:33 +09:00
Meteor.startup(function () {
if (!Events.findOne({name: 'firstRun'})) {
Events.insert({
name: 'firstRun',
unique: true, // will only get logged a single time
important: true,
createdAt: new Date(),
});
}
2015-01-02 16:05:28 +09:00
});
if (Telescope.settings.get('mailUrl')) {
process.env.MAIL_URL = Telescope.settings.get('mailUrl');
}
2015-04-22 11:33:36 +09:00
Meteor.startup(function() {
if (typeof SyncedCron !== 'undefined') {
SyncedCron.start();
}
});
Inject.obj('serverTimezoneOffset', {offset: new Date().getTimezoneOffset()});