Compare commits

...

3 Commits

Author SHA1 Message Date
4314388d11 download data dump from dajngo db 2016-08-11 12:30:08 -04:00
49e2010f07 switched to prod 2016-07-08 16:29:31 -04:00
c9bf7c4091 old way 2016-07-08 16:26:32 -04:00
2 changed files with 9 additions and 3 deletions

View File

@ -3,13 +3,19 @@ var router = express.Router();
var exec = require('child_process').exec;
/* GET home page. */
router.all('/', function(req, res, next) {
console.log("some one is here");
if(req.headers['x-github-event'] === 'push'){
if(req.body.ref === "refs/heads/master"){
console.log('time to update master!');
console.log("got a push!");
if(req.body.ref === "refs/heads/prod"){
console.log('time to update prod!');
exec('/var/www/gitwrapperdeploy.sh', console.log, console.log);
}
}
res.render('index', { title: 'Express' });
});
router.get('/dbdump', function(req, res, nex){
res.sendFile('/var/backups/db/djangodump.json');
});
module.exports = router;

View File

@ -6,6 +6,6 @@
</head>
<body>
<h1><%= title %></h1>
<p>Welcome to <%= title %></p>
<p>YO!! <%= title %></p>
</body>
</html>