app.js
...
app.use('/', indexRouter);
app.use('/user', userRouter);
app.use((req, res, next) => {
res.status(404).send('Not Found');
});
app.use((err, req, res, next) => {
...
다시 localhost:3000/abc에 접속하면 직접 만든 내용으로 화면이 변경됩니다.

▲ 그림 5-12 localhost:3000/abc 접속 화면
이런 식으로 404 에러 화면을 변경할 수 있습니다.