ping.js 475 B

12345678910111213141516171819202122232425
  1. 'use strict'
  2. import express from 'express'
  3. const router = express.Router()
  4. /**
  5. * @api {get} /ping /ping
  6. * @apiVersion 0.1.0
  7. * @apiName ping
  8. * @apiGroup API
  9. *
  10. * @apiDescription Check if the API is up
  11. *
  12. * @apiExample Usage example
  13. * curl -i -L -X GET "https://diran.univ-littoral.fr/api/ping"
  14. *
  15. * @apiSuccessExample {string} Success response example
  16. * HTTP/1.1 200 OK /api/ping
  17. * pong
  18. */
  19. router.get('/', (req, res) => res.send('pong'))
  20. export default router