Skip to content

Commit c1fc8b6

Browse files
Merge pull request #126 from zshnb/fix-run-server-locally
fix: add run swagger js when start server
2 parents de19048 + e89df05 commit c1fc8b6

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
@@ -43,7 +43,7 @@
4343
"semantic-release": "semantic-release",
4444
"preinstall": "npx playwright install",
4545
"start": "npm run start:dev",
46-
"start:server": "NODE_ENV=development npm run build && node dist/src/server.js",
46+
"start:server": "NODE_ENV=development node swagger.js && npm run build && node dist/src/server.js",
4747
"start:server:prod": "npm run build && node dist/src/server.js",
4848
"start:cli": "cross-env NODE_ENV=development npm run build && node dist/src/cli.js",
4949
"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)