Backend for Inforum
Must have dotnet version 6.x, Visual Studio or VSCode, MSSQL Server 2019 (optional for Windows), Git, Powershell(Windows only), Terminal like Zsh or Bash if Linux
- "JwtValidIssuer": for JWT Issuer
- "JwtValidAudience": for JWT Audience
- "JwtSecret": for JWT Secret. Must be a random generated string atleast 10 characters long
- "ConnectionStrings:InforumBackendContext": for DB Connection String
- "AllowedHosts": for allowed hosts
Example Configurations; Inflated(typically secrets.json
)
{
"AllowedHosts": "*",
"ConnectionStrings:InforumBackendContext": "Server=localhost;Database=InforumDB;User=testUser;Password=Test@123;",
"JwtValidIssuer": "Inforum",
"JwtValidAudience": "Inforum",
"JwtSecret": "AVeryRealSecretKey"
}
Example Configurations; Non-Inflated(typically appsettings.json
)
{
"AllowedHosts": "*",
"ConnectionStrings": {
"InforumBackendContext": "Server=localhost;Database=InforumDB;User=testUser;Password=Test@123;"
},
"JwtValidIssuer": "Inforum",
"JwtValidAudience": "Inforum",
"JwtSecret": "AVeryRealSecretKey"
}
Example DB Connection String
{
"ConnectionStrings:InforumBackendContext": "Server=host;Database=DBName;User=user;Password=Test@123;"
}
dotnet restore
: to restore(install) all needed packages used in Applicationdotnet build
: to build the Applicationdotnet run
: to run the applicationdotnet watch
: to run the application with watcher, useful during developmentdotnet ef migrations add '<MigrationMessage>'
: to add Migrationsdotnet ef database update
: to update Database as per latest migrationsdotnet tool restore
: to restore the tools
- Buildpack used: https://github.com/jincod/dotnetcore-buildpack
- Environment Variables: same as above along with
ASPNETCORE_ENVIRONMENT
andHEROKUISH
as per docs of buildpack. First being the nature of Environment,Production
for deployment and later being for a hackish way of Herokuish Support, set it totrue