Skip to content

Commit

Permalink
add generic view to render markdown, preliminary
Browse files Browse the repository at this point in the history
  • Loading branch information
micheg committed Jan 8, 2012
1 parent 416e665 commit de43b84
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
11 changes: 11 additions & 0 deletions data/init.sql
@@ -1,5 +1,16 @@
-- ONLY TESTED ON SQLITE

-- MAKE URLS
CREATE TABLE "urls" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"hash" TEXT NOT NULL,
"url" TEXT NOT NULL
)

-- MAKE USERS
CREATE TABLE "users" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"user" TEXT NOT NULL,
"password" TEXT NOT NULL,
"role" TEXT NOT NULL
)
7 changes: 4 additions & 3 deletions public_html/index.php
Expand Up @@ -22,14 +22,15 @@
require_once '../vendor/underscore.php';
require_once '../vendor/idiorm.php';
require_once '../vendor/my.php';
require_once '../vendor/markdown.php';

// custom setting
$app = new Slim(array(
'log.enable' => true,
'log.path' => './log',
'log.path' => '../log',
'log.level' => 4,
'templates.path' => './app/views',
'connection.string' => 'sqlite:./data/url.sqlite',
'templates.path' => '../app/views',
'connection.string' => 'sqlite:../data/url.sqlite',
'service.name' => $_SERVER['SERVER_NAME'] . '/',
));

Expand Down

0 comments on commit de43b84

Please sign in to comment.