feat: initial development
This commit is contained in:
15
Demo/Program.cs
Normal file
15
Demo/Program.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using NaiveHttpServer;
|
||||
|
||||
var server = new Server("localhost", 2333);
|
||||
|
||||
server
|
||||
.Use(Middlewares.Log)
|
||||
.Use(Middlewares.ExceptionHandling)
|
||||
.Use(Middlewares.StaticFile("/files", Environment.CurrentDirectory))
|
||||
.Use(Middlewares.NotFound(documentUrl: "http://api.project.com/v1"));
|
||||
|
||||
server.Start();
|
||||
|
||||
Console.ReadKey();
|
||||
|
||||
server.Stop();
|
||||
Reference in New Issue
Block a user