import { Router } from 'express';
import sseExpress from 'sse-express';
import manager from '../class/manager';

export default ({ config, db }) => {
	let api = Router();

	// perhaps expose some API metadata at the root
	api.get('/', sseExpress, (req, res) => {
		manager.addConnection(res);
	});

	api.delete('/', (req, res) => {
		console.log(req);
	});

	return api;
}
