Is there a way for node to define a shared variable that can be used in the background and in the front end?

some variables are needed in the front and background, is there any way to set a shared variable?

for example, I define an is_debug variable, a configuration file at the front end and a configuration file at the back end. Every time I put it online, I have to change two copies, which is more tedious.

Apr.05,2021

the backend provides a dedicated api, front end to pull data from the backend.
if the front end initialization is to be used, the back end explicitly passes the value to the front end through ways such as url.
if it doesn't work, you can only manually change the build setting before the front-end build, and read the is_debug of the back-end project first

Things like

cookie also seem to work, depending on the timing you need at the front end

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f0a9-414a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f0a9-414a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?