0
I have the route / on my server.js:
app.get("/", function(req, res){
res.sendFile("public/index.html", {root: __dirname})
})
And I need to run another javascript file that is in the same directory (or run the function that is contained in it) by accessing the route / before rendering the html.
is there any exception p async functions? pq apparently my server.js n is running the function...
– Samuel
No. You should only use the
async/await
that will work– Victor Eyer