// const SmeeClient = require('smee-client')

import SmeeClient from "smee-client"
if(!process.env.WEBHOOK_URL) throw new Error(`No webhook URL`)
const smee = new SmeeClient({
  source: process.env.WEBHOOK_URL,
  target: `http://localhost:${process.env.PORT || 3000}/`,
  logger: console
})
const events = smee.start()
export const stop = () => events.stop()