Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions GrandNode.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Project Path="src/Web/Grand.Web/Grand.Web.csproj" />
<Folder Name="/Build/">
<File Path="src/Build/Grand.Common.props" />
<File Path="src/Build/Grand.Plugin.props" />
Expand Down Expand Up @@ -58,13 +59,6 @@
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
</Folder>
<Folder Name="/src/" />
<Folder Name="/src/Core/" />
<Folder Name="/src/Tests/">
<Project Path="src/Tests/Grand.Web.Store.Tests/Grand.Web.Store.Tests.csproj" />
<Project Path="src/Tests/Grand.Web.Vendor.Tests/Grand.Web.Vendor.Tests.csproj" />
</Folder>
<Folder Name="/src/Web/" />
<Folder Name="/Tests/">
<Project Path="src/Tests/Aspire.ServiceDefaults.Tests/Aspire.ServiceDefaults.Tests.csproj" />
<Project Path="src/Tests/Grand.Business.Authentication.Tests/Grand.Business.Authentication.Tests.csproj" />
Expand All @@ -86,20 +80,24 @@
<Project Path="src/Tests/Grand.SharedKernel.Tests/Grand.SharedKernel.Tests.csproj" />
<Project Path="src/Tests/Grand.Web.Admin.Tests/Grand.Web.Admin.Tests.csproj" />
<Project Path="src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj" />
<Project Path="src/Tests/Grand.Web.Store.Tests/Grand.Web.Store.Tests.csproj" />
<Project Path="src/Tests/Grand.Web.Tests/Grand.Web.Tests.csproj" />
<Project Path="src/Tests/Grand.Web.Vendor.Tests/Grand.Web.Vendor.Tests.csproj" />
</Folder>
<Folder Name="/Web/">
<Project Path="src/Web/Grand.Web.Admin/Grand.Web.Admin.csproj" />
<Project Path="src/Web/Grand.Web.Store/Grand.Web.Store.csproj" />
<Project Path="src/Web/Grand.Web.Vendor/Grand.Web.Vendor.csproj" />
<Project Path="src/Web/Grand.Web/Grand.Web.csproj" />
</Folder>
<Folder Name="/Web/" />
<Folder Name="/Web/Shared/">
<Project Path="src/Web/Grand.SharedUIResources/Grand.SharedUIResources.csproj" />
<Project Path="src/Web/Grand.Web.AdminShared/Grand.Web.AdminShared.csproj" />
<Project Path="src/Web/Grand.Web.Common/Grand.Web.Common.csproj" />
<Project Path="src/Web/Grand.Web.Models/Grand.Web.Models.csproj" />
</Folder>
<Project Path="src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj" />
<Project Path="src/Aspire/Aspire.ServiceDefaults/Aspire.ServiceDefaults.csproj" />
<Folder Name="/Web/Panels/">
<Project Path="src/Web/Grand.Web.Admin/Grand.Web.Admin.csproj" />
<Project Path="src/Web/Grand.Web.Store/Grand.Web.Store.csproj" />
<Project Path="src/Web/Grand.Web.Vendor/Grand.Web.Vendor.csproj" />
</Folder>
<Folder Name="/Aspire/">
<Project Path="src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj" />
<Project Path="src/Aspire/Aspire.ServiceDefaults/Aspire.ServiceDefaults.csproj" />
</Folder>
</Solution>
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
27 changes: 24 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://localhost:5001> and
<http://localhost:5000>; the Visual Studio IIS Express profile uses
The `GrandNode (Kestrel)` profile listens on <https://localhost:5001> and
<http://localhost:5000>; the Visual Studio `GrandNode (IIS Express)` profile uses
<https://localhost:44350>.

> **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
Expand Down
4 changes: 2 additions & 2 deletions src/Aspire/Aspire.AppHost/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"Two instances + Redis (https)": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand All @@ -14,7 +14,7 @@
"ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true"
}
},
"http": {
"Two instances + Redis (http)": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
4 changes: 2 additions & 2 deletions src/Web/Grand.Web.Admin/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
}
},
"profiles": {
"IIS Express": {
"Admin panel only (IIS Express)": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "https://localhost:44343/admin",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Kestrel": {
"Admin panel only (Kestrel)": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "https://localhost:5011/admin",
Expand Down
12 changes: 2 additions & 10 deletions src/Web/Grand.Web.Store/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/Web/Grand.Web.Vendor/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"profiles": {
"Grand.Web.Vendor": {
"Vendor panel only (Kestrel)": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand All @@ -18,7 +18,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"Vendor panel only (IIS Express)": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "vendor",
Expand Down
25 changes: 0 additions & 25 deletions src/Web/Grand.Web/Grand.Web.sln

This file was deleted.

18 changes: 9 additions & 9 deletions src/Web/Grand.Web/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading