Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于两种类型的用户,我有两个不同的公用文件夹。如何设置 __dirname 以通过某些前缀访问路由?我的目录结构如下:
终于找到答案了。
app.use(express.static(__dirname + '/../users'));