Skip to content

Instantly share code, notes, and snippets.


kunal732/hookjs Secret

Created Feb 5, 2014
What would you like to do?
if (Meteor.isClient) {
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
'/apartment': function() {
post = this.request.body;
color = post.subject;
if(color.toLowerCase() == "on") {'PUT','', {data: {"on": true}})'PUT','', {data: {"on": true}})'PUT','', {data: {"on": true}})
else if(color.toLowerCase() == "off") {'PUT','', {data: {"on": false}})'PUT','', {data: {"on": false}})'PUT','', {data: {"on": false}})
}else {
color = parseFloat(color);
console.log('PUT','', {data: {"hue": color}}));'PUT','', {data: {"hue": color}})'PUT','', {data: {"hue": color}})
return [200, "Success"] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.