Add basic build instructions to README.md
This commit is contained in:
parent
d458be52ac
commit
3d4a34611b
27
README.md
27
README.md
|
|
@ -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
2
dev.py
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue