API for the Bazaar Realm Skyrim mod
Go to file
2020-07-23 00:12:56 -04:00
src Move interior refs list to interior_refs table 2020-07-22 22:42:17 -04:00
test_data Add test JSON payloads to repo 2020-07-22 23:30:20 -04:00
.gitignore Update setup instructions 2020-07-23 00:12:56 -04:00
Cargo.lock WIP adding interior_refs endpoints 2020-07-19 03:01:20 -04:00
Cargo.toml WIP adding interior_refs endpoints 2020-07-19 03:01:20 -04:00
devserver.sh Update setup instructions 2020-07-23 00:12:56 -04:00
README.md Update setup instructions 2020-07-23 00:12:56 -04:00

Development Setup

  1. Install and run postgres.
  2. Create postgres user and database (and add uuid extension while you're there ): createuser shopkeeper createdb shopkeeper sudo -u postgres -i psql postgres=# ALTER DATABASE shopkeeper OWNER TO shopkeeper; \password shopkeeper postgres=# CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
  3. Save password somewhere safe and then and add a .env file to the project directory with the contents: DATABASE_URL=postgresql://shopkeeper:@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 = "" db_name = "shopkeeper"
  5. Run cargo run -- -m which will compile the app in debug mode and run the database migrations.
  6. Run ./devserver.sh to run the dev server (by default it listens at 127.0.0.1:3030).

Todo

  • Make self-contained docker container that can run the app without any setup.