https://pulumi.com logo
#general
Title
# general
h

high-translator-22614

08/02/2019, 10:55 PM
for example, you could produce a library for cloud-based URL routing--define hostnames (static, serverless, or proxied backends), vhosts (hostnames), and paths on those vhosts.
Copy code
serverless = Package("Serverless-Package", "srcdir")
vh = VHost("<http://mysite.com|mysite.com>")
vh.get("/static", StaticDir("statics"))
vh.any("/api", HttpBackend(service))
vh.any("/", serverless.handler("mypackage:myfunc"))