Update setup instructions

This commit is contained in:
Tyler Hallada 2020-07-23 00:12:56 -04:00
parent a84694042f
commit 0275143559
3 changed files with 16 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
.env
Session.vim
src/db/refinery.toml
tags

View File

@ -9,13 +9,23 @@
postgres=# ALTER DATABASE shopkeeper OWNER TO shopkeeper;
\password shopkeeper
postgres=# CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
3. Save password somewhere safe and then update the password in `refinery.toml`
and add a `.env` file to the project directory with the contents:
DATABASE_URL=postgresql://shopkeeper@<password>@localhost/shopkeeper
3. Save password somewhere safe and then and add a `.env` file to the project
directory with the contents:
DATABASE_URL=postgresql://shopkeeper:<password>@localhost/shopkeeper
RUST_LOG="shopkeeper=debug"
HOST="http://localhost:3030"
4. Create a new file at `src/db/refinery.toml` with the contents:
[main]
db_type = "Postgres"
db_host = "localhost"
db_port = "5432"
db_user = "shopkeeper"
db_pass = "<database-password-here>"
db_name = "shopkeeper"
4. Run `cargo run -- -m` which will compile the app in debug mode and run the
database migrations.
5. Run `./devserver.sh` to run the dev server (by default it listens at
`0.0.0.0:3030`).
`127.0.0.1:3030`).
# Todo

View File

@ -1,2 +1,2 @@
#!/bin/sh
systemfd --no-pid -s 0.0.0.0:3030 -- cargo watch -x run
systemfd --no-pid -s 127.0.0.1:3030 -- cargo watch -x run