import { Router } from 'express';

const router = new Router();

router.get('/', (req, res, next) => {
  res.send('API up!');
});

router.get('/ping', (req, res, next) => {
  res.send('Ping');
});

export default router;

import { Router } from 'express';

const router = new Router();

router.get('/', (req, res, next) => {
  // Am I up?
  res.send('API up!');
});

router.get('/ping', (req, res, next) => {
  // - Hit Strava API
  // - Query for list of commutes
  // - Save new commutes (id, streamdata) in db
  res.send('Ping');
});

router.get('/ingest', (req, res, next) => {
  // - For commutes without reports
  // - generate report
  // - save report
});

router.get('/send', (req, res, next) => {
  // - email reports that have not been emailed
});

export default router;

Break it out.