sepia-search-motore-di-rice.../server/controllers/api/index.ts

18 lines
473 B
TypeScript
Raw Normal View History

2020-02-13 11:49:03 +01:00
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()
}