- Create EC2 instance
- Get example application from github.
- Use SCP to transfer files to a server
- Install node un Ubuntu
- Start node naively
- Install git on AWS
- Log in/create account at Amazon AWS
- Launch a new t2.micro Ubuntu Instance.
- Add HTTP and HTTPS to security group
- Create and download a new key
- View instances
- connect to the server using ssh
ssh -i /path/to/pem/file [email protected] - update key permissions
chmod 600 /path/to/pem/file - update apt-get repository
sudo apt-get update - update system
sudo apt-get updgrade
- Fork and clone
https://github.com/rogerwschmidt/aws-deploy npm installnpm start- Go to
localhost:3000in your browser to make sure that every thing works.
- Look at this documentation
- In your aws instance
- Create a folder for your server
sudo mkdir -p /srv/express - Change premissions
sudo chown ubuntu /srv/express
- Create a folder for your server
- Copy files
scp -i /path/to/pem/file -r . [email protected]:/srv/express
- Resource
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -sudo apt-get install -y nodejssudo apt-get install -y build-essential
- In /svr/express, run
sudo PORT=80 npm start - In your browser, go to
HTTP://your.ip.address.here - Run
sudo npm install -g nodemon - In /svr/express, run
sudo PORT=80 nodemon - Make a change on your local copy of the express app, and "redeploy" with scp