Explorar o código

Update the listen function to work only from the environment variable PORT

Lee Morgan hai 10 meses
pai
achega
53fa0f4172
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      app.js

+ 1 - 5
app.js

@@ -22,8 +22,4 @@ app.get("/image/:img", (req, res)=>res.sendFile(`${views}/image/${req.params.img
 app.get("/objects/setup.js", (req, res)=>res.sendFile(`${views}/objects/setup.js`));
 app.get("/objects/board.js", (req, res)=>res.sendFile(`${views}/objects/Board.js`));
 
-if(process.env.NODE_ENV === "production"){
-    module.exports = app;
-}else{
-    app.listen(process.env.PORT);
-}
+app.listen(process.env.PORT);