Serving static files with restify

前端 未结 7 1551
时光说笑
时光说笑 2020-12-29 20:26

I am learning to use Node.js. Currently, I have a folder structure that looks like the following:

index.html
server.js
client
  index.html
  subs
    index.h         


        
相关标签:
7条回答
  • 2020-12-29 20:49

    Try this : Here view is a static resource directory name

    server.get('/\/.*/', restify.plugins.serveStatic({
    
        directory: __dirname + "/view/",
        default: './home.html' 
    
       })
    );
    
    0 讨论(0)
提交回复
热议问题