Skip to content

Commit

Permalink
updated env
Browse files Browse the repository at this point in the history
  • Loading branch information
daimessdn committed Aug 3, 2021
1 parent 7e08f03 commit 5a73a80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules/
/node_modules
npm-debug.log
.DS_Store
/*.env
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ app.set("views", __dirname);
app.use(express.static("public"));
app.use(cors());

const PORT = process.env.PORT || 3000;

const uri = "http://192.168.1.9:3000" || process.env.URI;

// first testing
Expand Down Expand Up @@ -189,6 +191,6 @@ app.get("/prices/:blend/:period", async (request, response) => {
}
});

app.listen(3000, () => {
console.log("listening to http://localhost:3000");
app.listen(PORT, () => {
console.log(`listening to http://localhost:${PORT}`);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"dev": "nodemon index.js",
"start": "nodemon index.js",
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down

0 comments on commit 5a73a80

Please sign in to comment.