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));
|
||||
});
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@ doctype html
|
||||
html
|
||||
head
|
||||
title= title
|
||||
link(rel='stylesheet', href='/stylesheets/style.css')
|
||||
link(type='text/css' rel='stylesheet', href='/stylesheets/style.css')
|
||||
block head
|
||||
link(rel="icon", type="image/x-icon", href="/favicon.ico")
|
||||
body
|
||||
header
|
||||
h1
|
||||
|
||||
Reference in New Issue
Block a user