Add the static assets directory and serve it.
This commit is contained in:
parent
57620a2404
commit
c035bfec8a
@ -1,2 +0,0 @@
|
|||||||
/* Do something */
|
|
||||||
|
|
@ -29,7 +29,12 @@ app.get(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
app.get('/static/*', serveStatic({ root: "./assets/" }));
|
app.use('/static/*', serveStatic({
|
||||||
|
root: '/src/assets',
|
||||||
|
onNotFound: (path, c) => {
|
||||||
|
console.error(`${path} is not found; Trying to access ${c.req.path}`);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
console.log(JSON.stringify({ message: "Bootstrapping the routes..." }));
|
console.log(JSON.stringify({ message: "Bootstrapping the routes..." }));
|
||||||
app.route('/', home);
|
app.route('/', home);
|
||||||
|
Loading…
Reference in New Issue
Block a user