Experiment with Hy, Flask, and Postgres. #incomplete #notserious
Go to file
Elf M. Sternberg 1c89e0bc2d [★] Cleaned up the Makefile and got the source code inline builder working. 2016-02-13 12:39:14 -08:00
notes [★] Acheivement Unlocked: Serving static content with Flask. 2016-02-13 09:13:25 -08:00
source [★] Cleaned up the Makefile and got the source code inline builder working. 2016-02-13 12:39:14 -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 [★] Cleaned up the Makefile and got the source code inline builder working. 2016-02-13 12:39:14 -08:00
README.md [doc] Blocking out the second code example. 2016-02-08 15:14:12 -08:00
main.hy [★] Cleaned up the Makefile and got the source code inline builder working. 2016-02-13 12:39:14 -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