From 089a97f8bea8d448f4a04ce35d9786cd0e02f65c Mon Sep 17 00:00:00 2001 From: LUIS_9799 <68512719+LUIS9799@users.noreply.github.com> Date: Mon, 31 Oct 2022 20:00:31 -0500 Subject: [PATCH] why specify localhost? (0.0.0.0) Just listen por 8008 and not specify ip 0.0.0.0, it is unnesary bc it will listen to localhost with just port specification. --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 5abfd0d..96584c9 100644 --- a/index.js +++ b/index.js @@ -406,11 +406,11 @@ app.get('/:id', async (req, res) => { fs.readFile(`views/${view_name}`, 'utf8', async (err, data) => res.end(ejs.render(data, json))); } }); - -app.listen(8008, '0.0.0.0', () => { - console.log("We are live on 8008"); +//Specify IP to localhost is unnesesary, isn't it? +app.listen(8008, () => { + console.log("We are live! On port :8008"); }) //getting images //opengraph :) (caching should be used for this. need to redesign the url object, also keeping as one will probably be simplet) -//https://davidwalsh.name/open-graph-data-nodejs \ No newline at end of file +//https://davidwalsh.name/open-graph-data-nodejs