This template provides a robust starting point for projects utilizing a .NET Core 8 backend API and a Svelte / SvelteKit frontend as a Single Page Application (SPA). Designed to streamline development, this template combines powerful server-side API capabilities with a responsive, dynamic front end. Built following Microsoft’s ASP.NET Core SPA guidelines, this project serves as a foundation for scalable, modern web applications.
Clone the repository:
git clone https://github.com/your-username/Svelte.NetCore.git
cd Svelte.NetCore
Set up the Svelte frontend:
cd Sample.Svelte
npm install
npm run predev
Set up the .NET Core backend:
In visual studio right click on the Sample.Api project and select "properties" Go to the "Debug" tab Uncheck "Launch browser"
Run the backend:
In visual studio right click on the Sample.Api project and select "Set as Startup Project" Press F5 to run the project
In a new terminal, run the frontend:
cd ../Sample.Svelte
npm run dev
Hit F5 in Visual Studio Code to launch the browser or navigate to http://localhost:5173
in your browser
MIT License