Skip to content

Log URL with port on app start #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion advanced-integration/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "dotenv/config";
import express from "express";
import * as paypal from "./paypal-api.js";
const {PORT = 8888} = process.env;

const app = express();
app.set("view engine", "ejs");
Expand Down Expand Up @@ -38,4 +39,6 @@ app.post("/api/orders/:orderID/capture", async (req, res) => {
}
});

app.listen(8888);
app.listen(PORT, () => {
console.log(`Server listening at http://localhost:${PORT}/`);
});
5 changes: 4 additions & 1 deletion standard-integration/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "dotenv/config"; // loads variables from .env file
import express from "express";
import * as paypal from "./paypal-api.js";
const {PORT = 8888} = process.env;

const app = express();

Expand All @@ -25,4 +26,6 @@ app.post("/api/orders/:orderID/capture", async (req, res) => {
}
});

app.listen(8888);
app.listen(PORT, () => {
console.log(`Server listening at http://localhost:${PORT}/`);
});