From fcb1f741b99aad9049ebff27fc1f5a8cccd4fe78 Mon Sep 17 00:00:00 2001 From: Meizar Date: Thu, 31 Jul 2025 21:02:10 +0700 Subject: [PATCH] update Readme and specify application port --- README.md | 30 ++++++++++------------------- WebApp/appsettings.Development.json | 8 ++++++++ WebApp/appsettings.json | 9 ++++++++- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 061c388..d962dc0 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,29 @@ # Stitch a Ton Solution by Meizar (meizar.rimadana@formulatrix.com) - -## Requirement +## Requirements - .Net SDK 6.0 - OpenCVSharp4 4.11 -## Setup -- Change the environment variables `ASSET_PATH_RO` in `WebApp/Properties/launchSettings.json` -- Http port can be changed as needed - -## Publish and Run -Publish with targeting `linux-arm64` runtime +## Publish +Publish te project with targeting `linux-arm64` runtime and `self-contained` ``` cd ./WebApp dotnet publish -r linux-arm64 -c release --self-contained ``` - -Go to the publish folder +Transfer this published folder into Raspberry Pi ``` -cd bin/release/net6.0/linux-arm64/publish +bin/release/net6.0/linux-arm64/publish ``` +## Run +On the Raspberry Pi, go to the uploaded folder. Make it executable ``` -chmod +x WebApp +sudo chmod +x WebApp ``` -Run +Run the program ``` -./WebApp -``` - -Or, if the OpenCV4 has been installed, just run it -``` -cd WebApp -dotnet run +sudo ./WebApp ``` \ No newline at end of file diff --git a/WebApp/appsettings.Development.json b/WebApp/appsettings.Development.json index 0c208ae..fed3597 100644 --- a/WebApp/appsettings.Development.json +++ b/WebApp/appsettings.Development.json @@ -4,5 +4,13 @@ "Default": "Information", "Microsoft.AspNetCore": "Warning" } + }, + "AllowedHosts": "*", + "Kestrel": { + "EndPoints": { + "Http": { + "Url": "http://0.0.0.0:80" + } + } } } diff --git a/WebApp/appsettings.json b/WebApp/appsettings.json index 10f68b8..fed3597 100644 --- a/WebApp/appsettings.json +++ b/WebApp/appsettings.json @@ -5,5 +5,12 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "Kestrel": { + "EndPoints": { + "Http": { + "Url": "http://0.0.0.0:80" + } + } + } }