Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Site — ASP.NET Razor Pages + HTMX

Prerequisites

Install .NET 10

macOS (Homebrew)

brew install dotnet

Or download the installer directly from dot.net/download.

Verify the installation:

dotnet --version

Linux (Ubuntu)

sudo apt update && sudo apt install -y dotnet-sdk-10.0

Install Dependencies

cd test-site
dotnet restore

Build and Run

Do this when you need to run the server for benchmarking purposes.

Run server:

ConnectionStrings__DefaultConnection="Host=localhost;Port=5432;Database=benchmark;Username=benchmark;Password=benchmark" PORT="5223" ASPNETCORE_ENVIRONMENT="Production" dotnet run
  • ConnectionStrings__DefaultConnection is the connection string to the PostgreSQL database.
  • PORT defines the port on which the website is served.

When the server is ready, it logs a large multiline block of text which includes:

Now listening on: http://localhost:5223
Application started.

Run Test-Server for Development:

Do this if you need a quick preview of the website, or are actively working on it.

Update the connection string in test-site/appsettings.json to point to the postgreSQL server:

"ConnectionStrings": {
  "DefaultConnection": "Host=localhost;Port=5432;Database=benchmark;Username=benchmark;Password=benchmark"
}

Run the default launch profile (HTTP on port 5223):

dotnet run

Or run on a specific port:

PORT="{port}" dotnet run

About

Test site implementation in ASP.NET Core (.NET 10)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages