前端架構(gòu)師-大廠直通車
2023-03-18 12:32 作者:走走停停成風(fēng)景 | 我要投稿
console.log(notExt) ? ? //返回index
path.extname() 獲取路徑中的文件拓展名
path.extname(path)
參數(shù)path:表示一個(gè)路徑的字符串
返回值:<string>文件的拓展名部分(帶.)
http 模塊
http 模塊是nodejs官方提供的、用來創(chuàng)建web服務(wù)器的模塊。通過http模塊提供的 http.createServer() 方法,就可以創(chuàng)建服務(wù)器應(yīng)用
創(chuàng)建基本服務(wù)器
標(biāo)簽: