Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to access node js server from another computer

/* 
Change the host so you're not listening on localhost(127.0.0.1)
*/
const port = 3000;
const host = '0.0.0.0';

app.listen(port, host, () => {
  console.log('Listening on port ' + port);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #node #js #server #computer
ADD COMMENT
Topic
Name
8+8 =