mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +00:00
updated scripts
This commit is contained in:
@@ -16,6 +16,10 @@
|
|||||||
},
|
},
|
||||||
"plugins": ["@typescript-eslint", "prettier"],
|
"plugins": ["@typescript-eslint", "prettier"],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{ "argsIgnorePattern": "_" }
|
||||||
|
],
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"no-param-reassign": "off",
|
"no-param-reassign": "off",
|
||||||
"prettier/prettier": "error",
|
"prettier/prettier": "error",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
"start": "nodemon dist/server.js",
|
||||||
"dev:server": "ts-node-dev --respawn --transpile-only --ignore node_modules src/server.ts"
|
"dev:server": "ts-node-dev --respawn --transpile-only --ignore node_modules src/server.ts"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import cors from "cors";
|
|||||||
import AppError from "./errors/AppError";
|
import AppError from "./errors/AppError";
|
||||||
|
|
||||||
import routes from "./routes";
|
import routes from "./routes";
|
||||||
|
import "./database";
|
||||||
|
|
||||||
// import path from "path";
|
// import path from "path";
|
||||||
// import multer from "multer";
|
// import multer from "multer";
|
||||||
// import Sentry from "@sentry/node";
|
// import Sentry from "@sentry/node";
|
||||||
import "./database";
|
|
||||||
|
|
||||||
// const { initWbot } = require("./libs/wbot");
|
// const { initWbot } = require("./libs/wbot");
|
||||||
// const wbotMessageListener = require("./services/wbotMessageListener");
|
// const wbotMessageListener = require("./services/wbotMessageListener");
|
||||||
@@ -22,7 +22,7 @@ app.use(cors());
|
|||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
app.use(routes);
|
app.use(routes);
|
||||||
|
|
||||||
app.use(async (err: Error, req: Request, res: Response, next: NextFunction) => {
|
app.use(async (err: Error, req: Request, res: Response, _: NextFunction) => {
|
||||||
if (err instanceof AppError) {
|
if (err instanceof AppError) {
|
||||||
return res.status(err.statusCode).json({ error: err.message });
|
return res.status(err.statusCode).json({ error: err.message });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user