NodeJs 服务器上数组中的数据

Data in an array on a NodeJs server

我在节点 js 服务器文件上有一个数组,其中包含一些将被反复使用的静态数据。我的问题是,所有用户的数据是否保持不变,或者每个用户一开始都会得到一个空数组?

I am guessing that the array will be the same for all the users since it's on the server and the server will not change

如果您只是将数组存储在一个常规的旧变量中,并且您的服务器会针对每个请求检查该变量,那么所有用户都会看到相同的数据。