Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
jump and touch the sky

Sven Eppler ghandmann

🐢
jump and touch the sky
  • sodgeIT GmbH
View GitHub Profile
@ghandmann
ghandmann / eventstore-docker-port-web-ui.md
Created Jan 27, 2020
Accessing EventStore WebUI Docker on different port
View eventstore-docker-port-web-ui.md

When running EventStore inside a docker container, you may want to change the "outside" listenting port. This can be done easyil with docker and the port options.

But the EventStore WebUI will not respect these changes, since it does not know, that the "outside" port is different. Resulting in broken URLs generated by the EventStore WebUI which point to the default port 2113.

You can change this by setting both the EVENTSTORE_EXT_HTTP_PORT and EVENTSTORE_EXT_HTTP_PORT_ADVERTISE_AS environment variable when starting the docker container:

docker run -it --rm \
	-e EVENTSTORE_EXT_HTTP_PORT=9999 \
	-e EVENTSTORE_EXT_HTTP_PORT_ADVERTISE_AS=9999 \
  	-p 9999:2113 -p 1113:1113  eventstore/eventstore
@ghandmann
ghandmann / test.pl
Created Jul 24, 2017
Mojo::UserAgent async get request to unknown host error handling
View test.pl
use Mojo::Base -strict;
use Mojolicious;
use Mojo::UserAgent;
use Try::Tiny;
say "Mojolicious Version $Mojolicious::VERSION";
my $ua = Mojo::UserAgent->new();
my $requestCallback = sub {
@ghandmann
ghandmann / gist:2d739205952a30d37ef6
Created Aug 26, 2014
Mojo::Util url_escape and unicode characters
View gist:2d739205952a30d37ef6
#!/usr/bin/env perl
use strict;
use warnings;
use 5.10.0;
use Mojo::Util qw/url_escape/;
my $snowman = "\N{U+2603}";
say url_escape($snowman); # says %2603
@ghandmann
ghandmann / Websocket_Error_Handling
Last active Aug 29, 2015
Fatal errors in Event-Handlers only emit a finish-event with errorcode 1006
View Websocket_Error_Handling
#!/usr/bin/env perl
use Mojo::Base -strict;
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new();
$ua->on(error => sub {
my ($ua, $error) = @_;
warn "[ERROR] $error";
});
You can’t perform that action at this time.