Skip to content

Instantly share code, notes, and snippets.

@fnbf
fnbf / socket-node-ec2-bootstrap.sh
Last active February 12, 2018 22:49
Socket.io EC2 bootstrap
sudo yum -y install nginx
sudo mkdir /etc/nginx/ssl
sudo openssl req -nodes -x509 -days 1024 -newkey rsa:2048 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj '/C=US/ST=YOURSTATE/L=YOURCITY/O=YOURORG/OU=Web/CN=YOURWEBSITE'
sudo yum -y update
sudo yum install -y gcc-c++ make
sudo curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -
sudo yum install -y nodejs
sudo npm install forever -g --save
sudo echo "map \$http_upgrade \$connection_upgrade {