From 2ab4773de139809c531a832f527ed681e88937f4 Mon Sep 17 00:00:00 2001 From: Andy Miles Date: Wed, 6 Nov 2024 10:23:28 -0800 Subject: [PATCH] start a web server --- README.md | 1 + terraform/hello.py | 14 -------------- terraform/userdata.sh | 9 --------- 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 terraform/hello.py delete mode 100644 terraform/userdata.sh diff --git a/README.md b/README.md index 55b65de..fd3a0fc 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,4 @@ To destroy the infrastructure, run terraform destroy locally. Steps to be defined later in a video. now works remote and autodeletes CARE WHERE YOU PUT SECRETS - MUST BE IN REPO (not env) +this now runs locally - upadted aws config diff --git a/terraform/hello.py b/terraform/hello.py deleted file mode 100644 index 33c4d40..0000000 --- a/terraform/hello.py +++ /dev/null @@ -1,14 +0,0 @@ -from http.server import HTTPServer, BaseHTTPRequestHandler - - -class SimpleHandler(BaseHTTPRequestHandler): - def do_GET(self): - self.send_response(200) - self.send_header('Content-type', 'text/plain') - self.end_headers() - self.wfile.write(b"Hello, World from EC2!") - - -server = HTTPServer(('0.0.0.0', 8080), SimpleHandler) -print("Server started on port 8080") -server.serve_forever() diff --git a/terraform/userdata.sh b/terraform/userdata.sh deleted file mode 100644 index 4010524..0000000 --- a/terraform/userdata.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -sudo yum update -y -sudo yum install python3 -y -sudo yum install git -y - -mkdir -p /app -cp ./hello.py /app/hello.py - -python3 /app/hello.py &