Skip to content

Commit 2b322d9

Browse files
committed
Add README
1 parent 724746b commit 2b322d9

1 file changed

Lines changed: 53 additions & 1 deletion

File tree

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,53 @@
1-
....
1+
<img alt="icon" src=".diploi/icon.svg" width="32">
2+
3+
# Blazor Component for Diploi
4+
5+
[![launch with diploi badge](https://diploi.com/launch.svg)](https://diploi.com/component/blazor)
6+
[![component on diploi badge](https://diploi.com/component.svg)](https://diploi.com/component/blazor)
7+
[![latest tag badge](https://badgen.net/github/tag/diploi/component-blazor)](https://diploi.com/component/blazor)
8+
9+
## Operation
10+
11+
### Getting started
12+
13+
1. In the Dashboard, click **Create Project +**
14+
2. Under **Pick Components**, choose **Blazor**. Here you can also add a backend framework to create a monorepo app
15+
3. In **Pick Add-ons**, you can add one or multiple databases to your app
16+
4. Choose **Create Repository** to generate a new GitHub repo
17+
5. Finally, click **Launch Stack**
18+
19+
Link to the full guide - upcoming
20+
21+
### Development
22+
23+
During development, the container uses `dotnet watch` to enable automatic reloads when files change. The development server is started with:
24+
25+
```sh
26+
dotnet watch --no-launch-profile
27+
```
28+
29+
This will:
30+
- Use `dotnet watch` to monitor for changes to .cs, .razor, and .css files and restart the server when changes are detected.
31+
- Run the Blazor Server application with hot reload enabled.
32+
- Start the app on port 5054.
33+
- Enable automatic browser refresh when Razor components or CSS files change.
34+
35+
### Production
36+
37+
Builds a production-ready image. During the build, dependencies are restored with `dotnet restore` and the application is published with `dotnet publish`. When the container starts, it runs:
38+
39+
```sh
40+
dotnet component-blazor.dll
41+
```
42+
43+
This uses the compiled .NET application optimized for production deployment.
44+
45+
### Data Protection
46+
47+
The application uses ASP.NET Core Data Protection for securing authentication cookies and anti-forgery tokens. In Kubernetes deployments, data protection keys are persisted using a PersistentVolumeClaim to ensure session continuity across pod restarts.
48+
49+
## Links
50+
51+
- [Blazor documentation](https://docs.microsoft.com/en-us/aspnet/core/blazor/)
52+
- [ASP.NET Core documentation](https://docs.microsoft.com/en-us/aspnet/core/)
53+
- [.NET documentation](https://docs.microsoft.com/en-us/dotnet/)

0 commit comments

Comments
 (0)