fix(compose): fix nginx config to handle public folder

This commit is contained in:
2026-03-13 14:26:26 +01:00
parent c1c0b4e723
commit 5c42fb7f41
7 changed files with 75 additions and 55 deletions

View File

@@ -18,14 +18,14 @@ app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(import.meta.dirname, 'public')));
// app.use(express.static(path.join(import.meta.dirname, 'public')));
app.use('/', indexRouter);
app.use('/users', usersRouter);
app.use('/posts', postsRouter);
// catch 404 and forward to error handler
app.use(function(_, _, next) {
app.use(function(_req, _res, next) {
next(createError(404));
});