http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Can i deal with different path?

Open k42jc opened this issue 8 years ago • 3 comments

almost like nginx:

location / {
    root 'index path'
}

location /static/ {
    root 'static path'
}

or like http&express:


app.all('/static/*',function(req,res){
   // do somthing
});

k42jc avatar Dec 20 '17 03:12 k42jc

...
options:{
before:[beforeHandler]
}
...
function beforeHandler(req,res){
   let path = req.url;
  if(path === '/'){
     // index
  }
   ...
}

k42jc avatar Dec 21 '17 09:12 k42jc

This issue has been inactive for 180 days

github-actions[bot] avatar Aug 28 '21 12:08 github-actions[bot]

Duplicate of #139

thornjad avatar Aug 29 '21 22:08 thornjad