Skip to content

Instantly share code, notes, and snippets.

@munjeli
Last active March 20, 2023 16:26
Show Gist options
  • Save munjeli/8a821d189a8a132d39a52816ceef8a44 to your computer and use it in GitHub Desktop.
Save munjeli/8a821d189a8a132d39a52816ceef8a44 to your computer and use it in GitHub Desktop.
index page and webserver script
#!/bin/bash
mkdir server
cd server
aws s3api get-object --bucket <your bucket> --key <photo key> <photo name>
echo "<html>
<head>
<title>webserver</title>
</head>
<body>
<h1>Status 200</h1>
<p>The HTTP server is running!</p>
<img src="<photo name>" width="800"></img>
</body>
</html>" > index.html
python3 -m http.server 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment