UNPKG
express-generator-template
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.1
1.0.0
Express with Typescript Template
github.com/mimamch/express-typescript
mimamch/express-typescript
express-generator-template
/
template
/
main-template
/
src
/
app
/
middleware
/
not_found_handler_middleware.ts
7 lines
(5 loc)
•
265 B
text/typescript
View Raw
1
2
3
4
5
6
7
import
{ responseErrorWithMessage }
from
"@/utils/response"
;
import
{
Request
,
Response
}
from
"express"
;
export
default
function
notFoundHandlerMiddleware
(
req: Request, res: Response
) {
return
res.
status
(
404
).
json
(
responseErrorWithMessage
(
"Page Not Found"
)); }