Last active
March 20, 2023 16:26
-
-
Save munjeli/8a821d189a8a132d39a52816ceef8a44 to your computer and use it in GitHub Desktop.
index page and webserver script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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