Add basic build instructions to README.md

This commit is contained in:
Matthew Gordon 2024-03-02 20:14:46 -04:00
parent d458be52ac
commit 3d4a34611b
2 changed files with 27 additions and 2 deletions

View File

@ -1,2 +1,27 @@
# localhub # Locality
The [dev](./dev) script starts a Docker image for the Postgres server,
runs `cargo run` or `cargo test`, and then removes the created Docker
container.
Docker must be set up to run rootless for this script to work.
The script is able to install it's own dependencies into a Python
virtual environment:
```sh
# Install
./dev devupdate
```
Build and run the server locally:
```sh
./dev run
```
Run unit tests:
```sh
./dev unittest
```

2
dev.py
View File

@ -39,7 +39,7 @@ run_parser = subparsers.add_parser(
) )
run_parser.set_defaults(func=run) run_parser.set_defaults(func=run)
run_parser = subparsers.add_parser( run_parser = subparsers.add_parser(
'unit_test', help='Run unit tests' 'unittest', help='Run unit tests'
) )
run_parser.set_defaults(func=unit_tests) run_parser.set_defaults(func=unit_tests)
devupdate_parser = subparsers.add_parser( devupdate_parser = subparsers.add_parser(