Re-render with EJS (node and express)

Hey guys…
Question:
Im making a random quote gen using node/express
Im using EJS to render dynamically.
The quotes are coming from an NPM module
All goes well with the exception that the only way to get a new quote is by restarting the server.
I’ve tried all I could with that button and it simply won’t work unless the server is restarted. How can I accomplish that? (PS: I assume something equivalent to useState from React is the issue Im running into here… not sure.)
Thanks in Advance.

You would need to show some code, because

This means you are doing something wrong. However it isn’t possible to say what without showing what you have done.

// Requires:
const express = require("express");
const quote = require("inspirational-quotes");
const bodyParser = require("body-parser");

// Usages:
const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static("public"));
let randomQuote = "";
let randomAuthor = "";

// EJS
app.set("view engine", "ejs");

app.get("/", (req, res) => {
  randomQuote = quote.getQuote().text;
  randomAuthor = quote.getQuote().author;
  res.render("index.ejs", {
    randomQuote: randomQuote,

This seems to be missing half the code for that file, and also the code for the HTML (ie the EJS file you’ve written)