The console shows this this message after starting cro ('cro run'):
▶ Starting JoanPujol (JoanPujol)
**Endpoint HTTP will be at http://localhost:20000/**
JoanPujol Listening at http://localhost:3000
JoanPujol Shutting down...
♻ Restarting JoanPujol (JoanPujol)
JoanPujol Listening at http://localhost:3000
I have not been able to figure out where "Endpoint HTTP" is defined. This is my 'service.p6':
use Cro::HTTP::Log::File;
use Cro::HTTP::Server;
use Routes;
constant HOST = 'localhost';
constant PORT = 3000;
my Cro::Service $http = Cro::HTTP::Server.new(
:http<1.1>,
host => HOST,
port => PORT,
application => routes(),
after => [
Cro::HTTP::Log::File.new(logs => $*OUT, errors => %*ERR)
]
);
$http.start;
say "Listening at http://{HOST}:{PORT}";
react {
whenever signal(SIGINT) {
say "Shutting down...";
$http.stop;
done;
}
}
Thanks!