Created
February 20, 2020 09:41
-
-
Save DylanVerstraete/5c2552798d57bb1d69772c6a7b2f28a5 to your computer and use it in GitHub Desktop.
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
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