Pastes-Bin/lib/Pastes-Bin.rakumod

28 lines
540 B
Raku

use Humming-Bird::Core;
use Humming-Bird::Middleware;
use Humming-Bird::Advice;
use DB::Migration::Simple;
use DBIish;
# Local libs
use Pastes-Bin::Controller::Paste;
# Logging
middleware &middleware-logger;
advice &advice-logger;
# Database stuff
my $*dbh = DBIish.connect:
'Pg',
:host<devbussy.swagg.net>,
:database<pastes_bin>,
:user<pastes_bin>,
password => prompt 'enter DB password: ';
my $m = DB::Migration::Simple.new:
:$*dbh,
:migration-file<migrations>,
:verbose;
$m.migrate: :version<1>;