Skip to content

Instantly share code, notes, and snippets.

@DylanVerstraete
Created February 20, 2020 09:41
Show Gist options
  • Save DylanVerstraete/5c2552798d57bb1d69772c6a7b2f28a5 to your computer and use it in GitHub Desktop.
Save DylanVerstraete/5c2552798d57bb1d69772c6a7b2f28a5 to your computer and use it in GitHub Desktop.
class Package(j.baseclasses.threebot_package):
def start(self):
server = self.openresty
server.install(reset=False)
port = 8901
website = server.get_from_port(port)
locations = website.locations.get()
actor_location = locations.locations_custom.new()
actor_location.name = "unlock_service"
actor_location.config = """
location /threefoldfoundation/unlock_service {
rewrite ^(.+) /threefoldfoundation/unlock_service/actors/unlock_service;
}"""
locations.configure()
server.configure()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment