Custom .NET 8+ template using Nuxt 3 as front-end and utilizing ASP.NET Core's SPA feature during development.
This template can be installed in multiple ways :
- clone the repository
- in the repository, run
dotnet new install .
- once installed, run
dotnet new nuxt -o <project-directory>
to create a project using the template
- create a repository using this template (see the official documentation)
- remove the
.template.config
directory - rename the
csproj
with the project you want - replace the namespaces in the source files
- downloading the full repo zip file
- extract to the desired location
- repeat the template steps 2 through 4
During development, .NET automatically installs the dependencies with pnpm
and starts the Nuxt development server with pnpm dev
.
This will also generate the missing https certificates with the dotnet dev-certs
command.
The Nuxt dev server is then configured to proxy the /_
endpoint to the .NET server.
This allows the front-end to communicate to the back-end since they run on different ports.
See the nitro documentation for more details on how the proxy mapping works.