A tool for DMs
- pgAdmin4
- Rider or Visual Studio
- Visual Studio Code
- Coffee
Create a file named appsettings.Development.json
in the same directory as appsettings.json
with the following:
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"ConnectionStrings": {
"DBConnectionString": "Host=localhost;Port=<PORT>;Username=cnc_admin;Password=<PASSWORD>;Database=cnc;"
}
}
DBConnectionString:
<PORT> = the port of your postgres server. See instructions under the DATABASE instructions
<PASSWORD> = the password you set for the cnc_admin psql user. See instructions under the DATABASE instructions
Follow instructions here
- To build the docker image, run
docker build -t cnc:latest .
in the same directory as theDockerfile
file. - To run the image in a container, run
docker run -it -p 8080:80 cnc:latest
. The app can now be accessed from localhost:8080 - To get into the running container, you can run
docker exec -it <container id> bash
- You can retrieve the
container id
by runningdocker ps
- Run
npm install
in the ClientApp dir to install node dependencies - Run
dotnet restore
in the root dir to install dotnet dependencies - Run
dotnet build
in the root dir to build the backend services - To build a production build of the app
- Delete the node_modules folder in ClientApp
- Run
dotnet publish -c Release -o ./dist
from the App's root folder - Create a folder named ClientApp in the created dist folder and copy over the contents in the ClientApp/build folder into there
- To run the app, use
dotnet run --project Server/Server.csproj
from the root directory ordotnet run
from the Server directory - Similarly, to run the app in watch mode, use
dotnet watch --project Server/Server.csproj run
.
- To run backend tests run
dotnet run test
in the root directory - To run client tests, run
npm test
in the ClientApp directory
Below is no longer valid until updated
* To run server tests and generate coverage reports use ```dotnet test /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=\"lcov\" /p:Threshold=80```
* There is also a convenience bash script ```generateCoverageReports.sh``` that will run unit tests and place the coverage reports in the TestResults directory
Written in C# (.cs
) with dotnet core
Client is written in Typescript (.ts
) and React Typescript (.tsx
). Uses Redux for state management
- Add
[skip-ci]
in your commit message to skip ci