Fixed project
This commit is contained in:
31
ExampleApp/Program.cs
Normal file
31
ExampleApp/Program.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using AsyncHttp;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace ExampleApp
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[ServerPath(Method.GET, "/")]
|
||||
public class IndexPath : IPath
|
||||
{
|
||||
public override void HandleRequest(Request request)
|
||||
{
|
||||
Response.Body = Encoding.UTF8.GetBytes("Hello Async World");
|
||||
}
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Server server = new Server();
|
||||
//server.CertificatePath = "cert.pfx";
|
||||
//server.CertificatePassword = "1234";
|
||||
server.StartAsync();
|
||||
|
||||
while (true)
|
||||
{
|
||||
// do whatever you want in the meanwhile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user