18 lines
473 B
TypeScript
18 lines
473 B
TypeScript
import * as express from 'express'
|
|
import { badRequest } from '../../helpers/utils'
|
|
|
|
const apiRouter = express.Router()
|
|
|
|
apiRouter.use('/ping', pong)
|
|
apiRouter.use('/*', badRequest)
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export { apiRouter }
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
function pong (req: express.Request, res: express.Response) {
|
|
return res.send('pong').status(200).end()
|
|
}
|