mirror of
https://github.com/directus/directus.git
synced 2026-02-08 05:05:05 -05:00
15 lines
339 B
TypeScript
15 lines
339 B
TypeScript
import express from 'express';
|
|
import asyncHandler from 'express-async-handler';
|
|
import APIError, { errorHandler, ErrorCode } from './error';
|
|
|
|
const app = express()
|
|
.get(
|
|
'/',
|
|
asyncHandler(async (req, res, next) => {
|
|
throw new APIError(ErrorCode.NOT_FOUND, 'Route `/` not found');
|
|
})
|
|
)
|
|
.use(errorHandler);
|
|
|
|
export default app;
|