Files
old-tfm/app/server/startup.js

33 lines
678 B
JavaScript
Raw Normal View History

if (Meteor.isServer) {
Meteor.startup(function() {
// code to run on server at startup
2016-02-14 10:34:54 +01:00
SyncedCron.start();
});
2016-02-14 10:34:54 +01:00
2016-03-26 07:11:52 +01:00
// Global API configuration
var Api = new Restivus({
useDefaultAuth: true,
prettyJson: true
});
2016-03-26 07:11:52 +01:00
// Api.addRoute('sensorData', {
// authRequired: false
// }, {
// post: function() {
// SensorData.insert({
// temperatureValue: parseFloat(this.bodyParams.temperatureValue),
// humidityValue: parseFloat(this.bodyParams.humidityValue),
// tankFull: this.bodyParams.tankFull,
// owner: this.bodyParams.owner,
// created_at: new Date()
// });
// return [];
// }
// });
2016-02-14 10:34:54 +01:00
}