summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 21 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3663571..1d65c60 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,30 @@ This project's original source code is hosted [here][home].
## Usage
-Create a temporary database "test" with superuser "alex":
+Create and serve a temporary database:
- $ temp-postgres --dbname test --username alex
+ $ temp-postgres
-Connect to the "test" database:
+Wrap the `psql` command to connect to the temporary database once the server is ready:
- $ psql --host localhost --dbname test --username alex
+ $ temp-postgres -- psql
+
+Run [SQLx integration tests](https://docs.rs/sqlx/latest/sqlx/attr.test.html) against a temporary database:
+
+ $ temp-postgres -- cargo test
+
+Or configure `temp-postgres` as a wrapper for [cargo-nextest](https://nexte.st/):
+
+```toml
+experimental = ["wrapper-scripts"]
+
+[scripts.wrapper.temp-postgres]
+command = 'temp-postgres'
+
+[[profile.default.scripts]]
+platform = { host = 'cfg(unix)' }
+run-wrapper = 'temp-postgres'
+```
See the manual page for details.
Generated by cgit. See skreutz.com for my tech blog and contact information.