You can;
- Install PostgreSQL
- Use Docker to run PostgreSQL
To use Docker to run PostgreSQL locally, use the following command:
docker run -p 5432:5342 -e POSTGRES_USER=bakhtawar -e POSTGRES_PASSWORD=Bakhtawar123 -d bakhtawar
If you used the Docker command in the previous step, you can skip this step.
If you used the Docker command in the previous step, you can skip this step.
Remember to:
- set the password for this user to
Bakhtawar123
- grant all privileges on database
bakhtawar
to userbakhtawar
To install .NET 5.0, please visit https://dotnet.microsoft.com/download/dotnet/5.0
To install Node.js 14.x, please visit https://nodejs.org/en/
From your work folder:
git clone git@github.com:khawajaumarfarooq/Bakhtawar.git Bakhtawar
cd Bakhtawar
This will bring you to the repository root.
From the repository root:
dotnet restore
dotnet build
From the repository root:
dotnet run --project Projects/Bakhtawar.Apps.DatabaseApp/Bakhtawar.Apps.DatabaseApp.csproj
This will run the database migrations and create all the tables necessary for the solution
From the repository root:
cd Scripts
./generate-ca-certificate.sh
./generate-localhost-certificate.sh
This will generate the a certificate in ~/Keys/huntingdonresearch.crt
Add this certificate to your machine's CA root. You will have to do it for your machine, as well as for your browser.
This will also create a certificate in Keys/localhost.crt
which will be used as the SSL certificate by the 3 applications.
From the repository root (in three different bash shells):
cd Projects/Bakhtawar.Apps.GatewayApp
cat dev.json | dotnet user-secrets set
dotnet run
cd Projects/Bakhtawar.Apps.WebFrontendApp
cat dev.json | dotnet user-secrets set
dotnet run
cd Projects/Bakhtawar.Apps.BackendApp
cat dev.json | dotnet user-secrets set
dotnet run
This will run the 3 applications on the following ports:
- GatewayApp on port 7443
- WebFrontendApp on port 8443
- BackendApp on port 9443