diff --git a/.env b/.env deleted file mode 100644 index 3dd9dc7..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -MY_SECRET=value diff --git a/main.w b/main.w index 1132a80..ecf1b1d 100644 --- a/main.w +++ b/main.w @@ -1,10 +1,19 @@ bring cloud; +bring util; +bring http; +bring expect; -let secret = new cloud.Secret( - name: "MY_SECRET", +let website = new cloud.Website( + path: "./website", ); -new cloud.Function(inflight () => { - return secret.value(); -}); - +test "renders the index page" { + log("website.url: {website.url}"); + + let response = http.get(website.url); + log("response: {Json.stringify(response)} "); + + expect.equal(response.status, 200); + assert(response.body?.contains("Hello, Wing") == true); + +} diff --git a/on_deploy.main.w b/on_deploy.main.w deleted file mode 100644 index 580464e..0000000 --- a/on_deploy.main.w +++ /dev/null @@ -1,9 +0,0 @@ -bring cloud; - -let secret = new cloud.Secret( - name: "MY_SECRET", -); - -new cloud.OnDeploy(inflight () => { - throw "SECRET VALUE: '{secret.value()}'"; -}); diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..de5133e --- /dev/null +++ b/website/index.html @@ -0,0 +1,24 @@ + + +
+ + +