Skip to content

Instantly share code, notes, and snippets.

@rock3m
Created December 22, 2015 06:07
Show Gist options
  • Save rock3m/a1793d2120909eabbb2d to your computer and use it in GitHub Desktop.
Save rock3m/a1793d2120909eabbb2d to your computer and use it in GitHub Desktop.
var express = require('express');
var app = express();
app.use(express.bodyParser());
app.get('/is-timer-on', function(req, res) {
var hours = new Date().getHours() - 8;
if (hours >= 20 || hours <=7) {
res.send("false " + hours);
} else {
res.send("true " + hours);
}
});
app.listen();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment