Skip to content

johnathan-sewell/hackathon-local-zones

Repository files navigation

hackathon-local-zones

https://johnathan-sewell.github.io/AWS%20Local%20Zones

How this project was created

  • Installed express pnpm i express

  • Added server/index.mjs (Start with node .)

  • Added CDK stack for EC2 instance

Manual steps to prepare EC2 instance

SSH into the instance using the key pair. The key pair is created in the EC2 Dashboard.

The private key is downloaded stored on the local machine at ~/.ssh/Johnathan.pem.

The key is associated with the instance in CDK.

CPH

ssh -i "Johnathan.pem" [email protected]

EU

ssh -i "Johnathan-Eu.pem" [email protected]

Update and upgrade the system.

sudo apt update
sudo apt upgrade

Install Node

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Rsync the code to the instance

CPH

rsync -avz --exclude 'node_modules' --exclude '.git' --exclude 'stack' --exclude '.env' \
-e "ssh -i ~/.ssh/Johnathan.pem" \
. [email protected]:~/app

EU

rsync -avz --exclude 'node_modules' --exclude '.git' --exclude 'stack' --exclude '.env' \
-e "ssh -i ~/.ssh/Johnathan.pem" \
. [email protected]:~/app
sudo npm install -g pnpm

Run the server

cd app
pnpm install --production
sudo node .

Browse to the client page:

CPH http://96.0.24.72/

EU http://52.59.201.158/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published