UNPKG

create-types-backend

Version:

A CLI tool to quickly setup an Express.js backend in TypeScript, using essential configurations and user's preferences.

7 lines (6 loc) 294 B
import fs from "fs"; import { errorHandlerContent, tryCatchContent } from "../content/error-handler.js"; export const createErrorHandler = () => { fs.writeFileSync("src/middlewares/error-handler.ts", errorHandlerContent); fs.writeFileSync("src/utils/try-catch.ts", tryCatchContent); };