Skip to content

Commit

Permalink
Updating for Heroku deployments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Mervine committed Apr 9, 2015
1 parent 0ea5feb commit 79de4cd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 256 deletions.
83 changes: 0 additions & 83 deletions .nginx.conf

This file was deleted.

66 changes: 3 additions & 63 deletions Makefile
@@ -1,68 +1,8 @@
# Simple Makefile wrappers to support 'make <task>' over 'node make <task>'.
# This is a simple solution to avoid rewriting deployment automation.
###

all:
node make all

test:
node make test

test-nc:
node make test-nc

travis: test bootlint validator

clean:
node make clean

run:
node make run

start:
node make start

stop:
node make stop

restart:
node make restart

status:
node make status

help:
node make help

bootlint:
node make bootlint

validator:
node make validator

wp-plugin: setup
node make wp-plugin

###
# Tasks which remain in Makefile only.
###

setup:
npm run setup

nginx/start:
sudo /usr/local/nginx/sbin/nginx -c /home/$(USER)/bootstrap-cdn/nginx.conf

nginx/stop:
sudo pkill -9 nginx

nginx/restart: nginx/stop nginx/start

nginx/reload: nginx/clean nginx.conf
sudo pkill -HUP nginx

nginx.conf:
sed -e "s/CURRENT_USER/$(USER)/g" .nginx.conf > nginx.conf
node make $@

nginx/clean:
rm nginx.conf
%:
node make $@
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: node app.js
35 changes: 0 additions & 35 deletions make.js
Expand Up @@ -5,7 +5,6 @@ var path = require('path');
var http = require('http');
var fs = require('fs');

var FOREVER = path.join(__dirname, 'node_modules/.bin/forever');
var MOCHA = path.join(__dirname, 'node_modules/.bin/mocha');
var BOOTLINT = path.join(__dirname, 'node_modules/.bin/bootlint');
var VALIDATOR = path.join(__dirname, 'node_modules/.bin/html-validator');
Expand Down Expand Up @@ -49,38 +48,6 @@ var VALIDATOR = path.join(__dirname, 'node_modules/.bin/html-validator');
assertExec('node app.js');
};

//
// make start
//
target.start = function() {
if (!test('-e', 'logs')) {
mkdir('logs');
}
env.NODE_ENV = 'production';
assertExec(FOREVER + ' -p ./logs -l server.log --append --plain start server.js', { async: true });
};

//
// make stop
//
target.stop = function() {
assertExec(FOREVER + ' stop server.js');
};

//
// make restart
//
target.restart = function() {
assertExec(FOREVER + ' restart server.js');
};

//
// make status
//
target.status = function() {
assertExec(FOREVER + ' list');
};

//
// make travis
//
Expand Down Expand Up @@ -198,8 +165,6 @@ var VALIDATOR = path.join(__dirname, 'node_modules/.bin/html-validator');
echo(' test-nc runs the tests w/o colors');
echo(' clean cleanup working directory');
echo(' run runs for development mode');
echo(' start start application deamonized');
echo(' stop stop application when deamonized');
echo(' bootlint run Bootlint locally');
echo(' help shows this help message');
};
Expand Down
75 changes: 0 additions & 75 deletions server.js

This file was deleted.

2 comments on commit 79de4cd

@XhmikosR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and how can one test locally stuff now?

@jmervine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. This was an oversight. I need to revisit this.

Please sign in to comment.