HashLoad / horse

Fast, opinionated, minimalist web framework for Delphi
MIT License
1.17k stars 217 forks source link

res.render script.js not found error #329

Closed volitan-com-tr closed 1 year ago

volitan-com-tr commented 1 year ago

GET http://localhost:222/script.js net::ERR_ABORTED 404 (Not Found) I am getting this error when rendering with script.js from index.html file with res.render. both files are in the same folder but script.js file cannot be found. in node js

const main = require("./routes/main"); app.use("/", main); router.get('/', (req,res,next) => { res.render('index.html') }) This is how we used it.

THorse.Use(CORS); Thorse.Use(Jhonson()); Is there a use like this? app.use(express.static('public')) node.js

ramyres110 commented 1 year ago

Olá @volitan-com-tr tente utilizar o horse-server-static https://github.com/CachopaWeb/horse-server-static!