fix(compose): fix nginx config to handle public folder
This commit is contained in:
@@ -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));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user