Skip to content

Commit f1b4c4c

Browse files
Edita IgnotEdita Ignot
authored andcommitted
Fallback port added
1 parent 0ee5a35 commit f1b4c4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

typescript-magic-link-example/dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require("dotenv/config");
99
const index_1 = __importDefault(require("./routes/index"));
1010
dotenv_1.default.config();
1111
const app = (0, express_1.default)();
12-
const port = process.env.PORT;
12+
const port = process.env.PORT || 8000;
1313
app.use('/public', express_1.default.static('public'));
1414
app.use(express_1.default.urlencoded({ extended: false }));
1515
app.use('/', index_1.default);

typescript-magic-link-example/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dotenv.config()
77

88
const app = express();
99

10-
const port = process.env.PORT;
10+
const port = process.env.PORT || 8000;
1111

1212
app.use('/public', express.static('public'))
1313

0 commit comments

Comments
 (0)