Skip to content

2. Build & Test 🔧

Miles Watson edited this page Feb 26, 2021 · 3 revisions

Building and testing is currently only supported on Windows x64 - however, some functionalities may also work on Linux or ARM.

All commands should be run from the root directory of the project (/Hosta).

1. Install Dependencies

First, install the .NET 5 SDK.

Next, install Docker:

2. Clone the repo

git clone https://github.com/mileswatson/hosta.git

3. Unit Test

./scripts/test.cmd or dotnet test src

4. Build

./scripts/build.cmd or dotnet build src

6. Run

Node: Dotnet (auto rebuild)

dotnet run -p src/Node YOURPATH YOURPORT

Node: Docker

First, ensure that you have recently run the build script.

To start the node, run the following commands from the root directory of the project. Replace YOURPATH with a path to a folder to store the node data, and YOURPORT with a port to bind the server to (12001 recommended).

docker run --name node-dev -v YOURPATH:/app/data -p YOURPORT:12000 mileswatson/hosta:node-dev

You can exit from the docker terminal with Ctrl+C, and then use docker stop node-dev to halt the node. You may need to run docker rm node-dev to restart the node.

Client (build first)

Ensure that the client build is up to date.

./src/ClientWPF/bin/HostaClient/ClientWPF.exe

You can append a path to be used as the default directory.

7. Publish

To publish zip files to the /publish directory, run the following command in the root directory of the project.

./scripts/publish.cmd