Skip to content

bennof/pinkserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image of PinkServer

pinkserver

A small c# webserver named after Pinksteren (Dutch: Pentecost) the time of the core development.

Server

Minimalistic HTTP server using the default debugging Handler.

// create router and set handler
Handlers routes = new Handlers();
routes.Add("http://localhost:8080/", new DefaultHandler());

// create and start server
Server s = new Server("http://localhost:8080/",routes);
s.Start();

// stop server            
s.Stop();

Router

Uses first partial hit to route requests.

Template Engine

Simple converter to cs with embedded code.

Static File Handler

Static file handler uses the path of the URL and appends it to a given path. If a prefix is defined, the prefix is removed for URL before added to the local path. Following code will return C:\some\path\to\files\file.html if http://localhost:8080/to/be/removed/file.html is requested.

new StaticFileHandler("C:\some\path\to\files","to/be/removed")

DB Server (Access)

TODO

  • write a documentation
  • create example files
  • impove templates

License

Copyright 2018, Benjamin Falkner.

Code

MIT License: the LICENSE file.

About

A small c# webserver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published