sudo npm install -g bower sudo npm install -g grunt-cli sudo apt-get install ruby sudo apt-get install ruby-dev (without this native extension build fails) sudo gem install compass
http://start.jcolemorrison.com/building-an-angular-and-express-app-part-1/
cd /client && npm install cd /client && bower install cd /client grunt build --force cd /server && npm install
cd /server && npm test
cd /client && grunt build --force
cd /server && npm start
cd /client && grunt unit
cd /client && grunt e2e
cd /server && npm test cd client/node_modules/protractor/bin && ./webdriver-manager start cd client/node_modules/protractor && protractor conf.js
cd /client && grunt watch
-
Follow these steps
-
- cd code/karvinen2 && git pull
-
- cd ../server && rm -rf dist
-
- cd code/karvinen2/client && grunt build --force
-
- cd code/karvinen2/server
-
- sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
-
- NODE_ENV=production forever start bin/www
sudo iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
- More info:
- https://www.npmjs.com/package/forever
- http://stackoverflow.com/questions/25084368/how-do-i-use-forever-with-express-to-keep-a-nodejs-server-running
- http://stackoverflow.com/questions/7674565/node-express-set-node-env-when-using-forever-to-run-script-continiously
#NGINX #Read Nginx log sudo nginx -t #Restart sudo service nginx restart
/etc/nginx/sites-enabled server { listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6
root /home/kry/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name tukiyhdistyskarvinen.fi;
location / {
proxy_pass http://localhost:3000;
}
}
ln -s /etc/nginx/sites-available/tukiyhdistyskarvinen.fi /etc/nginx/sites-enabled/tukiyhdistyskarvinen.fi
Problems and solutions: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly http://stackoverflow.com/questions/26337557/badvalue-invalid-or-no-user-locale-set-please-ensure-lang-and-or-lc-environme
Failed to build gem native extension (installing Compass) http://stackoverflow.com/questions/22544754/failed-to-build-gem-native-extension-installing-compass