Go to this link: https://dotnet.microsoft.com/en-us/download
Download the .NET 9.0 version
Open VSCode
In command palette, type: .NET: New Project and click it
Select: ASP.NET Core Web App (Model-View-Controller)
Create a folder named wwwroot and add index.html
Inside the index.html add:
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>ASP Page</title>
7 <style>
8 html, body {
9 margin: 0;
10 padding: 0;
11 height: 100vh;
12 width: 100vw;
13 overflow: hidden;
14 font-family: 'Inter', sans-serif;
15 display: flex;
16 }
17 .container {
18 flex: 1;
19 flex-direction: column;
20 display: flex;
21 height: 100%;
22 width: 100%;
23 }
24 .iframe {
25 width: 100%;
26 height: 100%;
27 border: none;
28 border-radius: 0.3rem;
29 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
30 }
31 h2 {
32 color: #343a40;
33 margin-bottom: 1rem;
34 text-align: center;
35 }
36 </style>
37</head>
38<body>
39 <div class="container">
40 <h2>Tetrons Editor</h2>
41 <iframe
42 src="https://staging.tetrons.com/editor/dist/editor-host.html"
43 width="100%" height="600"
44 style="border: none;"
45 allowfullscreen></iframe>
46 </div>
47</body>
48</html>
In Program.cs add the following:
1var builder = WebApplication.CreateBuilder(args);
2var app = builder.Build();
3
4app.UseDefaultFiles(); // Looks for index.html
5app.UseStaticFiles(); // Enables serving from wwwroot
6
7app.Run();
Run: dotnet run, or
Using live server, or
Directly open the html file from file explorer