diff --git a/GrandNode.slnx b/GrandNode.slnx index 8d3a5539a7..864294ee75 100644 --- a/GrandNode.slnx +++ b/GrandNode.slnx @@ -4,6 +4,7 @@ + @@ -58,13 +59,6 @@ - - - - - - - @@ -86,20 +80,24 @@ + + - - - - - - + - - + + + + + + + + + diff --git a/README.md b/README.md index 409f0d0309..3216eeeafa 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,10 @@ dotnet build GrandNode.slnx dotnet run --project src/Web/Grand.Web ``` +`Grand.Web` is the project to run: one process serves the storefront and the Admin (`/admin`), Store (`/store`) and +Vendor (`/vendor`) panels. The `Grand.Web.Admin`, `Grand.Web.Store` and `Grand.Web.Vendor` projects can also run on +their own, for installations that host a panel separately; you don't need them to work locally. + Build the whole solution once before the first run: plugins and modules copy themselves into the web project's output when they are built. Run with `ASPNETCORE_ENVIRONMENT=Development` (the launch profiles already set it), otherwise the admin panel loads without its CSS and JavaScript. diff --git a/docs/development.md b/docs/development.md index c476e80ea4..83984ab81b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -83,16 +83,37 @@ grid markup, the plugin compatibility shim and the e2e smoke tests are described dotnet run --project src/Web/Grand.Web ``` +The solution has several projects that start a web server. For day-to-day work +you only need the first one: + +| Project | What it runs | When to start it | +| --- | --- | --- | +| `src/Web/Grand.Web` | the storefront and the Admin (`/admin`), Store (`/store`) and Vendor (`/vendor`) panels in one process | always - this is the application | +| `src/Web/Grand.Web.Admin`, `Grand.Web.Store`, `Grand.Web.Vendor` | one panel on its own, with its own configuration (see below) | only to try an installation that hosts a panel separately from the storefront | +| `src/Aspire/Aspire.AppHost` | two `Grand.Web` instances with MongoDB and Redis containers and the Aspire dashboard | only to test several instances sharing a cache, or to look at the telemetry; needs Docker | + +In the solution these projects are under `Web/Panels`. They hold the panels' +code, which `Grand.Web` references, so that is where admin changes go; their own +launch profiles are named `... panel only`, so the IDE's run list says what +starting one of them does. + +A standalone panel does not share anything with `Grand.Web` on disk. It reads +`App_Data/Settings.cfg` from its own project directory, so until you copy that +file over from `src/Web/Grand.Web/App_Data` it treats the database as not +installed. Plugins are not copied into its output either, so it runs without +them. + `Grand.Web` does not reference the plugins - they install themselves into its output directory when *they* are built. So build the solution once (`dotnet build GrandNode.slnx`) before the first run; after that you can start the web project alone. -The Kestrel profile listens on and -; the Visual Studio IIS Express profile uses +The `GrandNode (Kestrel)` profile listens on and +; the Visual Studio `GrandNode (IIS Express)` profile uses . -> **Set `ASPNETCORE_ENVIRONMENT=Development`.** Both launch profiles already do. +> **Set `ASPNETCORE_ENVIRONMENT=Development`.** Both `GrandNode` launch profiles already do; +> the `Docker` profile does not. > If you start the application without it, the static web assets manifest is not > consulted, every file served from `_content/...` returns 404 and the admin > panel loads with no CSS and no JavaScript at all. It looks like a broken diff --git a/src/Aspire/Aspire.AppHost/Properties/launchSettings.json b/src/Aspire/Aspire.AppHost/Properties/launchSettings.json index 43ec3ebbe3..61e8c049c6 100644 --- a/src/Aspire/Aspire.AppHost/Properties/launchSettings.json +++ b/src/Aspire/Aspire.AppHost/Properties/launchSettings.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", "profiles": { - "https": { + "Two instances + Redis (https)": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, @@ -14,7 +14,7 @@ "ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true" } }, - "http": { + "Two instances + Redis (http)": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, diff --git a/src/Web/Grand.Web.Admin/Properties/launchSettings.json b/src/Web/Grand.Web.Admin/Properties/launchSettings.json index af8a0c0fa0..4a7afad2c0 100644 --- a/src/Web/Grand.Web.Admin/Properties/launchSettings.json +++ b/src/Web/Grand.Web.Admin/Properties/launchSettings.json @@ -8,7 +8,7 @@ } }, "profiles": { - "IIS Express": { + "Admin panel only (IIS Express)": { "commandName": "IISExpress", "launchBrowser": true, "launchUrl": "https://localhost:44343/admin", @@ -16,7 +16,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "Kestrel": { + "Admin panel only (Kestrel)": { "commandName": "Project", "launchBrowser": true, "launchUrl": "https://localhost:5011/admin", diff --git a/src/Web/Grand.Web.Store/Properties/launchSettings.json b/src/Web/Grand.Web.Store/Properties/launchSettings.json index 0be1953f91..5d65070044 100644 --- a/src/Web/Grand.Web.Store/Properties/launchSettings.json +++ b/src/Web/Grand.Web.Store/Properties/launchSettings.json @@ -1,19 +1,11 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "http://localhost:5255", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { + "Store panel only (Kestrel)": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, + "launchUrl": "store", "applicationUrl": "https://localhost:7083;http://localhost:5255", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/src/Web/Grand.Web.Vendor/Properties/launchSettings.json b/src/Web/Grand.Web.Vendor/Properties/launchSettings.json index a8d4c6ac2d..5c2f8c97ca 100644 --- a/src/Web/Grand.Web.Vendor/Properties/launchSettings.json +++ b/src/Web/Grand.Web.Vendor/Properties/launchSettings.json @@ -8,7 +8,7 @@ } }, "profiles": { - "Grand.Web.Vendor": { + "Vendor panel only (Kestrel)": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, @@ -18,7 +18,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "IIS Express": { + "Vendor panel only (IIS Express)": { "commandName": "IISExpress", "launchBrowser": true, "launchUrl": "vendor", diff --git a/src/Web/Grand.Web/Grand.Web.sln b/src/Web/Grand.Web/Grand.Web.sln deleted file mode 100644 index 3ed4bf656f..0000000000 --- a/src/Web/Grand.Web/Grand.Web.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grand.Web", "Grand.Web.csproj", "{A5DE43B1-31A5-4B4E-80CC-06F9D456C77C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A5DE43B1-31A5-4B4E-80CC-06F9D456C77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A5DE43B1-31A5-4B4E-80CC-06F9D456C77C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5DE43B1-31A5-4B4E-80CC-06F9D456C77C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A5DE43B1-31A5-4B4E-80CC-06F9D456C77C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {114FC0AE-137B-47F1-8A95-6CB71ED0E1A7} - EndGlobalSection -EndGlobal diff --git a/src/Web/Grand.Web/Properties/launchSettings.json b/src/Web/Grand.Web/Properties/launchSettings.json index 419c701a88..1074a3afb0 100644 --- a/src/Web/Grand.Web/Properties/launchSettings.json +++ b/src/Web/Grand.Web/Properties/launchSettings.json @@ -8,24 +8,24 @@ } }, "profiles": { - "IIS Express": { - "commandName": "IISExpress", + "GrandNode (Kestrel)": { + "commandName": "Project", "launchBrowser": true, + "launchUrl": "https://localhost:5001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "Performance__UseResponseCompression": "false" - } + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000" }, - "Kestrel": { - "commandName": "Project", + "GrandNode (IIS Express)": { + "commandName": "IISExpress", "launchBrowser": true, - "launchUrl": "https://localhost:5001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "Performance__UseResponseCompression": "false" - }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" - }, + } + }, "Docker": { "commandName": "Docker", "launchBrowser": true,