Skip to content

mohammad-aliB/Dispatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

dispatcher

This custom web application framework was created to be very light weight and fast, it allows for some basic functionality similar to Express. An example of how it could be used can be found below:

var dispatcher=require("/Dispatcher/index.js");
dispatcher.setUP(80,'172.104.16.138'); //port then ip you want to listen on

dispatcher.staticDirectory('/Static','/Blog/staticAssets'); // the first path is the one you want to acces the static files with at the second is the one you want to retrieve the static file from. so for example example.com/Static/Hello.world would be /Blog/staticAssets/Hello.world on the server

dispatcher.GetRequest('/',function(req,res){ // the quotes are the path name
res.writeHead(200, {
'Cache-Control':'no-cache, no-store, must-revalidate',
'Pragma':'no-cache',
'Expires':'0'
});
res.end("Hello world!");
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published