forked from RLRabinowitz/TempTemplates
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89dcf67
commit 23576ed
Showing
12 changed files
with
1,154 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/bin/ | ||
/node_modules/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config: | ||
aws:region: us-east-1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: hello-world | ||
runtime: nodejs | ||
description: A static website S3 bucket serving an HTML greeting the user with their own custom cat image |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Hello World on AWS | ||
A static website S3 bucket serving an HTML greeting the user with their own custom cat image | ||
 | ||
|
||
## Configuration | ||
|
||
### Environment Variables | ||
- `USER` - sets the user name to greet on the html generated from `index.template.html` | ||
|
||
### Terraform Variables | ||
None |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: 1 | ||
|
||
deploy: | ||
steps: | ||
setupVariables: | ||
after: | ||
- npm i | ||
- ls /opt | ||
- ls / | ||
- ls . | ||
- pwd | ||
|
||
destroy: | ||
steps: | ||
setupVariables: | ||
after: | ||
- npm i | ||
- ls | ||
- ls /opt | ||
- ls / | ||
- ls . | ||
- pwd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<html> | ||
|
||
<head> | ||
<title> | ||
Hello from env0! | ||
</title> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"> | ||
<style> | ||
body { | ||
font-family: 'Roboto'; | ||
padding-top: 50px; | ||
width: 40%; | ||
margin: auto; | ||
background-image: url("https://app.env0.com/static/media/background.06648d2b.svg"); | ||
background-size: cover; | ||
} | ||
|
||
div { | ||
display: flex; | ||
text-align: center; | ||
} | ||
|
||
.main { | ||
flex-direction: column; | ||
} | ||
|
||
.power { | ||
align-items: center; | ||
justify-content: center; | ||
margin-top: 20px; | ||
} | ||
|
||
img { | ||
border-radius: 50px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="main"> | ||
<h1>Welcome to your own environment !!!USER!!!</h1> | ||
|
||
<img alt="hello" src="https://cataas.com/cat/says/Hello%20!!!USER!!!" /> | ||
<div class="power"> | ||
<span>Powered by </span> | ||
<a href="https://www.env0.com"> | ||
<img width="100px" | ||
src="https://assets.website-files.com/5ceab5395d0f478e169de7c0/5ceab5395d0f47937d9de7c7_Env0-Color.svg" /> | ||
</a> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as apigateway from "@pulumi/aws-apigateway"; | ||
import * as fs from 'fs'; | ||
|
||
const indexTemplate = fs.readFileSync('index.template.html', 'utf-8'); | ||
const index = indexTemplate.replace(new RegExp('!!!USER!!!', 'g'), process.env.USER!); | ||
fs.writeFileSync('www/index.html', index); | ||
|
||
const api = new apigateway.RestAPI("api", { | ||
routes: [ | ||
{ | ||
path: "/", | ||
localPath: "www" | ||
}, | ||
], | ||
}); | ||
|
||
export const url = api.url; |
Oops, something went wrong.