diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | conf/clog.conf | 2 | ||||
-rw-r--r-- | db/db.sql | 4 |
3 files changed, 4 insertions, 4 deletions
@@ -4,9 +4,7 @@ An attempt to reimplement flog, using the [kore.io](https://kore.io) framework. ## TODO -* Use UUIDs for primary key in PostgreSQL. * Dockerize. * Determine how to handle `lib`/dependencies. -* Add GET /resource/{UUID} endpoint. * Figure out how to build a statically-linked/standalone binary. * Upgrade to Kore 4.2. diff --git a/conf/clog.conf b/conf/clog.conf index 8a6cf81..2415e5b 100644 --- a/conf/clog.conf +++ b/conf/clog.conf @@ -27,7 +27,7 @@ domain * { filemap /static/ assets/static route / posts - route ^/posts/[a-z1-9\-]+$ post + route ^/posts/[a-z0-9\-]+$ post route /posts posts } @@ -2,8 +2,10 @@ CREATE DATABASE clog; \connect clog +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + CREATE TABLE posts ( - id BIGINT NOT NULL, -- PRIMARY KEY UUID + id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), title CHARACTER VARYING NOT NULL, body CHARACTER VARYING NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), |