ASP.NET Core Buying Catalogue Web Application
This repository contains a revised architecture for the Buying Catalogue.
Once complete, this will become the single repository required for the Buying Catalogue.
You can use either the latest version of Visual Studio or .NET CLI for Windows, Mac and Linux.
This application provides a Web Application capable of running on Linux or Windows.
Note: Docker Desktop can also be used if you'd prefer. However, Docker Desktop frequently has installation or runtime issues that will go un-patched for several versions.
The latest version of NodeJS has an issue which prevents installation of the required dependencies.
Upon installing v17.9.1, open an elevated command prompt and install the windows-build-tools
package via npm install -g windows-build-tools
.
Next, cd
to <repository root>/src/NHSD.GPIT.BuyingCatalogue.WebApp
and from there run the following commands.
npm install
npx gulp min
All scripts are meant to be run in PowerShell from within the repository root directory.
To setup the application prerequisites (Database, test data and Azurite), run the following scripts:
& '.\docker-build.ps1'
and then:
& '.\docker-start.ps1'
Afterwards, open the solution in Visual Studio and run/debug NHSD.GPIT.BuyingCatalogue.WebApp
Azurite, an Azure Storage emulator, is automatically configured via Docker Compose.
To connect to Azurite via the Azure Storage emulator you should follow the standard connection instructions but instead using the following ports:
- Blobs port: 10000
- Queues port: 10003
- Tables port: 10002
These ports have been selected to avoid a conflict with monitoring software that may bind to port 10001
The database SQL Project has been migrated to Microsoft's Microsoft.Build.Sql SDK to enable .NET Core support for the database project.
As a consequence, building in Visual Studio isn't currently supported. To build the database solution dotnet build
must be used instead.
Alternatively, the preexisting docker-compose
approach will continue to work as normal.
See the following PR for more information on the Microsoft.Build.Sql migration.
The dacpac
deployment takes a few seconds to initialize and complete so it is not unusual for there to be a slight delay between SQL server initializing and the database being ready for use; upon completion <DB Name> database setup complete
is logged to the console.