Last active
April 20, 2016 23:58
-
-
Save ike/3d6de0805654d0fe9eeba985f628f21d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. ~/.profile | |
cd greenscreen | |
killall -9 node | |
npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. ~/.profile | |
. ~/.bashrc | |
### INSTALL PREREQUISITES | |
# apt-get update | |
apt-get install git couchdb | |
### INSTALL NVM | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh | |
. ~/.profile | |
. ~/.nvm/nvm.sh | |
nvm install 4.2.1 | |
nvm alias default 4.2.1 | |
nvm use default | |
### SETUP AUTH FILE | |
mkdir users | |
touch users/users.htpasswd | |
if ! grep -Fxq "USERDIR" ~/.profile | |
then | |
echo "export USERDIR=~/users" >> ~/.profile | |
fi | |
. ~/.profile | |
### SETUP DB AND ROUTING | |
couchdb | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 4994 | |
### CLONE AND INSTALL PROJECT | |
rm -rf greenscreen | |
git clone [email protected]:ike/greenscreen.git | |
cd greenscreen | |
npm i | |
npm run create-config | |
npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment