Experiment with Hy, Flask, and Postgres. #incomplete #notserious
Go to file
Elf M. Sternberg 07ae886569 [★] Serving up the require.js stuff properly, now getting transactions. 2016-02-13 13:37:45 -08:00
notes [★] Acheivement Unlocked: Serving static content with Flask. 2016-02-13 09:13:25 -08:00
source [★] Serving up the require.js stuff properly, now getting transactions. 2016-02-13 13:37:45 -08:00
.gitignore [★] Acheivement Unlocked: Serving static content with Flask. 2016-02-13 09:13:25 -08:00
LICENSE Doin' the Github Thing. 2016-02-08 15:12:09 -08:00
Makefile [★] Serving up the require.js stuff properly, now getting transactions. 2016-02-13 13:37:45 -08:00
README.md [doc] Blocking out the second code example. 2016-02-08 15:14:12 -08:00
main.hy [★] Serving up the require.js stuff properly, now getting transactions. 2016-02-13 13:37:45 -08:00
officehours.sql [feat] The ability to get a list of all allocated appointments and office hours is up. 2016-02-08 20:14:24 -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