#!/bin/bash

dir=`pwd`
cd bin
user=`whoami`
urls="http://localhost:10800;https://localhost:10443"
if [[ "$user" == "root" ]]
then
    urls="http://localhost:80;https://localhost:443"
fi

# Set Kestrel environment variables for HTTPS certificate
export ASPNETCORE_ENVIRONMENT=Development
export ASPNETCORE_URLS="$urls"
export ASPNETCORE_Kestrel__Certificates__Default__Path="../https_cert.pfx"
export ASPNETCORE_Kestrel__Certificates__Default__Password=YourSecurePassword123!
./Web --tui

cd $dir
