Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

[REFACTOR]:Refactor smeeClient to run only in development environment #56

Closed
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
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,19 @@ app.get("/logs", (req, res) => {
});

app.listen(process.env.PORT, () =>
logger.info(`App listening on PORT:${process.env.PORT}`)
logger.info(`App listening on PORT:${process.env.PORT}`)
);

const SmeeClient = require("smee-client");

if (process.env.NODE_ENV === "development") {
const SmeeClient = require("smee-client");

const smee = new SmeeClient({
source: "https://smee.io/badging",
target: "http://localhost:2020",
source: process.env.source,
target: `http://localhost:${process.env.PORT}`,
logger: console,
});

smee.start();
}