File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,35 @@ public object Map(string code, string customer)
126
126
public string Name { get ; set ; } = " admin" ;
127
127
}
128
128
```
129
+ ### Windows service
130
+ ``` csharp
131
+ class Program
132
+ {
133
+ private static HttpServer mServer ;
134
+
135
+ static void Main (string [] args )
136
+ {
137
+ mServer = new HttpServer (80 );
138
+ mServer .IsWindowsServices = true ;
139
+ mServer .Setting ((service , option ) =>
140
+ {
141
+ option .LogToConsole = true ;
142
+ option .WriteLog = true ;
143
+ option .LogLevel = BeetleX .EventArgs .LogType .Info ;
144
+ });
145
+ mServer .RegisterComponent <Home >();
146
+ mServer .Run ();
147
+ }
148
+ }
149
+ [Controller ]
150
+ public class Home
151
+ {
152
+ public object Hello (string name )
153
+ {
154
+ return $" hello {name }" ;
155
+ }
156
+ }
157
+ ```
129
158
### EntityFrameworkCore extensions
130
159
` BeetleX.FastHttpApi.EFCore.Extension `
131
160
``` csharp
You can’t perform that action at this time.
0 commit comments