Skip to content

What a better way to practice a particular language other than socket programming

License

Notifications You must be signed in to change notification settings

adityahp241099/simpleHTTPServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simpleHTTPServer

Usage

import simpleHTTPServer.Server;
import simpleHTTPServer.View;
import simpleHTTPServer.response.StringResponse;

class DemoServer{
    public static void main(String[] args){
        Server s = new Server();

        //Writing views for our server
        View mainPage = (request)->{
            return new StringResponse(request,"<h1>This is our home page</h1>");
        };
        s.register("/",mainPage);
        s.start();
    }
}

About

What a better way to practice a particular language other than socket programming

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages