Pastes-Bin/lib/Pastes-Bin.rakumod

28 lines
554 B
Raku
Raw Normal View History

2023-11-23 04:21:19 +00:00
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; # Coming soon!
# 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>;