Experiment with Hy, Flask, and Postgres. #incomplete #notserious
Go to file
Elf M. Sternberg a0d44664bd [doc] Adding Django-Appointments to things I've considered. 2016-02-08 15:19:34 -08:00
notes [doc] Adding Django-Appointments to things I've considered. 2016-02-08 15:19:34 -08:00
.gitignore Init. 2016-02-07 11:15:39 -08:00
LICENSE Doin' the Github Thing. 2016-02-08 15:12:09 -08:00
Makefile Everything works except callproc. Nothing gets saved on callproc. Why? 2016-02-07 18:37:34 -08:00
README.md [doc] Blocking out the second code example. 2016-02-08 15:14:12 -08:00
main.hy A few updates. 2016-02-08 15:09:08 -08:00
main.py A few updates. 2016-02-08 15:09:08 -08:00
officehours.sql Last-minute fixes to get demo up and sorta running. 2016-02-07 21:18:42 -08:00
play.hy A few updates. 2016-02-08 15:09:08 -08:00

README.md

officehours

A small experiment with Flask/Hy/Postgres. Doesn't do much yet.

Initialization

Start with initializing the virtual environment and Postgres

# From the project directory:
$ virtualenv venv
$ . ./venv/bin/activate
$ pip install hy psycopg2 flask
$ sudo -u postgres psql postgres
> CREATE DATABASE officehours;
> CREATE USER officehours;
> ALTER USER officehours WITH UNENCRYPTED PASSWORD '<password>';
> ALTER USER officehours LOGIN;
> GRANT ALL PRIVILEGES ON DATABASE officehours TO officehours;
> \CONNECT officehours;
> CREATE EXTENSION citext; 
> CREATE EXTENSION btree_gist; 
> CREATE EXTENSION plv8; 
> ^d

Current functionality is demonstrated with:

$ psql -h localhost -U officehours -d officehours -f officehours.sql
$ hy play.hy