Recent | Popular
#restapi #no #express
res.sendFile(path.resolve('index.html'));
path.resolve('index.html')
import path from 'path';
import express from "express";
import express from "express"; import path from 'path'; const app = express(); const PORT = process.env.PORT || 5000; app.get('/',(req,res)=>{ res.sendFile(path.resolve('index.html')); }) app.listen(PORT,()=> console.log('server is running'));
Sat May 21 2022 17:34:22 GMT+0000 (Coordinated Universal Time)
Sat May 21 2022 17:31:39 GMT+0000 (Coordinated Universal Time)
Sat May 21 2022 17:27:26 GMT+0000 (Coordinated Universal Time)
Sat May 21 2022 17:25:09 GMT+0000 (Coordinated Universal Time)
Sat May 21 2022 17:18:43 GMT+0000 (Coordinated Universal Time)
Sat May 21 2022 17:18:41 GMT+0000 (Coordinated Universal Time)