1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00
squid-js/src/examples/runner.ts
2019-01-25 10:53:53 +01:00

11 lines
221 B
TypeScript

import {Logger} from "../squid"
export function runner(fn: () => Promise<any>) {
fn()
.then(() => process.exit(0))
.catch((e) => {
Logger.error(e)
process.exit(1)
})
}