Skip to content

Commit

Permalink
Merge pull request #126 from zshnb/fix-run-server-locally
Browse files Browse the repository at this point in the history
fix: add run swagger js when start server
  • Loading branch information
marcelovicentegc authored Jan 4, 2024
2 parents de19048 + e89df05 commit c1fc8b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"semantic-release": "semantic-release",
"preinstall": "npx playwright install",
"start": "npm run start:dev",
"start:server": "NODE_ENV=development npm run build && node dist/src/server.js",
"start:server": "NODE_ENV=development node swagger.js && npm run build && node dist/src/server.js",
"start:server:prod": "npm run build && node dist/src/server.js",
"start:cli": "cross-env NODE_ENV=development npm run build && node dist/src/cli.js",
"start:dev": "cross-env NODE_ENV=development npm run build && node dist/src/main.js",
Expand Down
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import express from "express";
import express, { Express } from "express";
import cors from "cors";
import { readFile } from "fs/promises";
import { Config, configSchema } from "./config.js";
Expand All @@ -11,7 +11,7 @@ import { PathLike } from "fs";

configDotenv();

const app = express();
const app: Express = express();
const port = Number(process.env.API_PORT) || 3000;
const hostname = process.env.API_HOST || "localhost";

Expand Down

0 comments on commit c1fc8b6

Please sign in to comment.