Say I have an express app:
const app = express();
app.use('/sites', express.static(path.join(__dirname, '/sites')));
And in folder /sites there is index.html.
The html file contains a form that posts to a server address. How can I adapt the URL to which the form posts depending on an environment variable?
For example, is it possible to use a placeholder in index.html that will be replaced by the NodeJS environment variable before sending it as response to the client?
<%= exampleVar %>tag?