Skip to content
/ Dotnet.Web.Nuxt Public template

Custom .NET template using Nuxt and ASP.NET Core's SPA feature

Notifications You must be signed in to change notification settings

julesrx/Dotnet.Web.Nuxt

Repository files navigation

Dotnet.Web.Nuxt

Build and publish

Custom .NET 8+ template using Nuxt 3 as front-end and utilizing ASP.NET Core's SPA feature during development.

Usage

This template can be installed in multiple ways :

Using dotnet new

  1. clone the repository
  2. in the repository, run dotnet new install .
  3. once installed, run dotnet new nuxt -o <project-directory> to create a project using the template

Using GitHub's template feature

  1. create a repository using this template (see the official documentation)
  2. remove the .template.config directory
  3. rename the csproj with the project you want
  4. replace the namespaces in the source files

Downloading the full repo zip file

  1. downloading the full repo zip file
  2. extract to the desired location
  3. repeat the template steps 2 through 4

How it works

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.

About

Custom .NET template using Nuxt and ASP.NET Core's SPA feature

Topics

Resources

Stars

Watchers

Forks