How to link my JS file from a different directory to my EJS file
I have an ejs file in the following directory:
How to link my JS file from a different directory to my EJS file
I have an ejs file in the following directory:
EJS isn’t being rendered
I’m making a rock, scissors, paper game on the backend of Node.js with express server, frontend.js client-side, index.ejs and main.css files. I firstly want to render a string line of the result of your decision (won, lost, the same – try again).
However, it doesn’t render the result. I tried to use console.log
to detect if the data is passed between the routes, which indeed happens and it literally shows that the data is in the ejs template, but it still doesn’t render.
I tried to use chat GPT to figure it out and it failed…
CSS not getting applied to EJS page
I am using ExpressJS and EJS to make a blog site. On clicking the edit button, edit page is opened however CSS stylings are missing. The CSS applies to other pages just fine.
1.after reloading the page form automatically getting submitted every time i reload
I cant access this error message in ejs.if i use locals.error in ejs after reloading the form, form getting submitted automatically even catching the error my usersignup function is running automatically.if i use only error it says error is not defined.[enter image description here](https://i.sstatic.net/fzYrIz06.png)
i sent {error : error.message } and tried locals.error in ejs. after that i submit the form and reload the form its getting submitted automatically. everytime i reload the page.
Using express-rate-limit without reloading the entire page
I’m using express-rate-limit
to limit the number of connection attempts.