Dotnet 8+ (SDK) required to compile backend.
Make sure to install the dependencies
dotnet restore
Copy settings template appsettings.json.tpl to appsettings.json
Change postgresql connection string and other settings in appsettings.json for local development
Start the development server on http://localhost:5000
dotnet run
Copy settings template appsettings.json.tpl to appsettings.Production.json
Change postgresql connection string and other settings in appsettings.Production.json for production environment
Build the application for production:
dotnet publish ./explorer-backend.csproj -c Release -o ./output/linux-x64 --self-contained -r linux-x64
For development/publishing vscode IDE can be used. There are convinient commands predefined. For backend, make sure to open explorer-backend folder in vscode (it should be project-root) or open workspace via:
veil-explorer.code-workspace
Use next hotkey:
CTRL+SHIFT+P
#or
F1
# than press
backspace
# than type word
task
# than press
space
# below actions will open tasks list dropdown menu
This actions can also be opened via: Terminal > Run task
Available actions:
# run application
run
# run with hot-reload (useful for development)
watch
# publish application
publish
# publish self-contained build for linux-x86_64 platform
publish linux-x86_64 (self-contained)
Press F5 to start debugging. Addition configs can be configured in .vscode/launch.json