Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
head fork: seanhess/ratinatorly
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 28 additions and 0 deletions.
  1. +7 −0 app.js
  2. +21 −0 deploy
7 app.js
View
@@ -12,10 +12,17 @@ app.get('/users/:username/email', function(req, res) {
var username = req.param('username')
users.getUser(username, function(err, user) {
if (err) return res.send({error:err.message}, 500)
+ // if (!user) return res.send({error:"Not found"}, 404)
res.send({email:user.email})
})
})
+process.on("uncaughtException",
+ function(err) {
+ // maybe email it or something
+ console.log(err.stack)
+})
+
var PORT = process.env.PORT || 3333
app.listen(PORT)
console.log("Listening on " + PORT)
21 deploy
View
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+echo "DEPLOY"
+ssh -t root@ratinator.ly <<REMOTE
+cd ratinatorly
+
+# checkout
+echo 'Checking out code'
+git fetch
+git reset --hard origin/master
+
+# install deps
+echo 'Installing'
+npm install
+
+# start the server
+echo 'Restarting'
+stop ratinatorly
+start ratinatorly
+
+REMOTE

No commit comments for this range

Something went wrong with that request. Please try again.