thnaylor / CLDV7111wPOE

KhumaloCraft Emporium is an online destination for exquisite handcrafted goods and unique artisanal creations.
0 stars 2 forks source link

Local Development Guide #45

Open thnaylor opened 1 month ago

thnaylor commented 1 month ago

Local Development:

Setup a local database server:

  1. Install SQL Server Management Studio

image

  1. Install SQL Express

image

  1. Once SQL Server Management Studio is installed you should be able to connect to a database server and create new databases.

image

image

Setup the local project

There are 2 main folders for the project KhumaloCraft.Web and KhumaloCraft.BusinessAPI.

Backend server setup

  1. Clone the Github repository to your local machine

image

  1. Open the solution with Visual Studio

image

  1. In the KhumaloCraft.BusinessAPI folder:

    • You will see an appsettings.json file. Under connection strings you will see the DefaultConnection. This string provides the connection to the SQL Server database. In most cases it can be left as the default but will need to be changed if connecting to a different database.
  2. In the Package Manager Console for KhumaloCraft.BusinessAPI:

    • Run the command Update-Database. If your database server has been installed correctly, the database for the project will automatically be created and you will see the database updated with the Entities used in this project.

image

  1. Start the BusinessAPI server:
    • You should be a Swagger website open up on your localhost with the available endpoints.

image

Frontend UI setup

  1. There is no setup required for the UI besides starting the project. Ensure that the KhumaloCraft.BusinessAPI has been started first as the UI depends on this.

image

Both projects should now be running:

image

Admin logins are set in the SeedData.cs file: