Skip to content

Instantly share code, notes, and snippets.

@samdaltonmaag
samdaltonmaag / gist:7a55d8e3fad6e671ccd1
Created October 28, 2014 10:40
production node server command
sudo NODE_ENV=production forever start -a -l /var/log/daltonmaag.com/www.daltonmaag.com.log -o /var/log/daltonmaag.com/www.daltonmaag.com.log -e /var/log/daltonmaag.com/www.daltonmaag.com.error.log /var/www/html/production/daltonmaag.com/server.js
@samdaltonmaag
samdaltonmaag / pre-commit
Created October 7, 2014 16:03
pre-commit
#!/bin/sh
hash="$(git describe --always)"
path="$(git rev-parse --show-toplevel)/config"
filename=".git-commit-sha"
filepath="$path/$filename"
echo $hash > $filepath
git add $filepath
@samdaltonmaag
samdaltonmaag / daltonmaag.com
Last active January 6, 2016 16:02
server setup
## /etc/nginx/sites-available/daltonmaag.com
# create an upstream for the node server
upstream node_app {
server 127.0.0.1:3000;
}
server {
listen 0.0.0.0:80;
server_name testing.daltonmaag.com testweb;