--- /dev/null
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use CGI;
+use DBI;
+use Template;
+
+require "secrets"; # server data - shit that doesn't need to uploaded.
+
+my $cgi = CGI->new;
+
+my $tt = Template->new({
+ INCLUDE_PATH => '.',
+ INTERPOLATE => 1,
+ }) or die Template->error();
+
+# $dbfile from secrets
+my $dbh = DBI->connect("dbi:SQLite:uri=file:$dbfile?mode=rwc");
+
+my $path = $cgi->param('path') // '';
+
+my %site = (
+ ixtab => 'index',
+ img => 'img',
+ );
+
+my $vars = (
+ sneed => 'feed',
+ chuck => 'fuck',
+ );
+
+my $page = $site{"$path"} // '404';
+
+print $cgi->header(
+ -Content_Type => 'text/html',
+ -charset => 'UTF-8',
+ );
+
+# I should probably put all of below into a buffer and run a pruning regexp on it
+$tt->process('tt/' . $page, $vars) or die $tt->error();