summaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2014-05-24 14:41:21 -0700
committerAaron Parecki <aaron@parecki.com>2014-05-24 14:41:21 -0700
commit3f82ec2f757c62c25a31b461e0a0cddc14886117 (patch)
tree8eb85c7f356df87f2bf477a54c7ab521002492a1 /public/index.php
Working app! Copied signin logic from OwnYourGram. New "post" interface for writing a simple text post. Also supports browser geolocation.
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..0612b1d
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,25 @@
+<?php
+chdir('..');
+require 'vendor/autoload.php';
+require 'lib/Savant.php';
+require 'lib/config.php';
+require 'lib/helpers.php';
+require 'lib/markdown.php';
+
+// Configure the Savant plugin
+\Slim\Extras\Views\Savant::$savantDirectory = 'vendor/saltybeagle/savant3';
+\Slim\Extras\Views\Savant::$savantOptions = array('template_path' => 'views');
+
+// Create a new app object with the Savant view renderer
+$app = new \Slim\Slim(array(
+ 'view' => new \Slim\Extras\Views\Savant()
+));
+
+require 'controllers/auth.php';
+require 'controllers/controllers.php';
+
+session_name('indiepost');
+session_set_cookie_params(86400*30);
+session_start();
+
+$app->run();