Skip to content

Commit 18d4733

Browse files
committed
fix: add run swagger js when start server
1 parent b802560 commit 18d4733

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"semantic-release": "semantic-release",
4343
"preinstall": "npx playwright install",
4444
"start": "npm run start:dev",
45-
"start:server": "NODE_ENV=development npm run build && node dist/src/server.js",
45+
"start:server": "NODE_ENV=development node swagger.js && npm run build && node dist/src/server.js",
4646
"start:server:prod": "npm run build && node dist/src/server.js",
4747
"start:cli": "cross-env NODE_ENV=development npm run build && node dist/src/cli.js",
4848
"start:dev": "cross-env NODE_ENV=development npm run build && node dist/src/main.js",

src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import express from "express";
1+
import express, {Express} from "express";
22
import cors from "cors";
33
import { readFile } from "fs/promises";
44
import { Config, configSchema } from "./config.js";
@@ -11,7 +11,7 @@ import { PathLike } from "fs";
1111

1212
configDotenv();
1313

14-
const app = express();
14+
const app: Express = express();
1515
const port = Number(process.env.API_PORT) || 3000;
1616
const hostname = process.env.API_HOST || "localhost";
1717

0 commit comments

Comments
 (0)