Portfolio
JavaScript CSS Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
client
server
shared
static
test-utils
test
tools
.babelrc
.eslintignore
.eslintrc
.gitignore
.postcssrc
.stylelintrc
README.md
build.sh
ecosystem.development.json
package.json
travis.yml

README.md

GOAT

Pre installation

mac

sudo port install nodejs8 npm4 mongodb mongodb-tools redis

ubuntu

# obtain pem key
chmod 400 coinswift.pem
ssh -i "goat.pem" ubuntu@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com

# configure EC2 instance
sudo groupadd www
sudo usermod -a -G www ubuntu
exit
sudo mkdir /var/www
sudo chown -R root:www /var/www
sudo chmod 2775 /var/www

# add source for node.js
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh

# install
sudo apt-get update

# production
sudo apt-get install nodejs redis-server mongodb nginx

sudo nano /etc/nginx/sites-available/default
sudo nginx -s reload

To make the first build run:

generate ssh key

ssh-keygen -t rsa -b 4096 -C "trejgun@gmail.com"
cat ~/.ssh/id_rsa.pub

clone repo

git clone git@bitbucket.org:trejgun/goat.git

install

cp ./server/shared/configs/mongo.sample.js ./server/shared/configs/mongo.js
cp ./server/shared/configs/config.sample.js ./server/shared/configs/config.js
npm i

run in dev mode

npm start

run in prod mode

npm run build
node_modules/.bin/pm2 start ecosystem.production.json
# or
NODE_ENV=production npm start

test

npm t

code coverage

npm run coverage

eslint

npm run lint