You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
8 years ago | |
---|---|---|
notes | 8 years ago | |
source | 8 years ago | |
.gitignore | 8 years ago | |
LICENSE | 8 years ago | |
Makefile | 8 years ago | |
README.md | 8 years ago | |
main.hy | 8 years ago | |
officehours.sql | 8 years ago | |
play.hy | 8 years ago |
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