Search
 
SCRIPT & CODE EXAMPLE
 

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);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: regular expression for beginners javascript 
Javascript :: GET and CHANGE the class of an element 
Javascript :: payfast javascript 
Javascript :: js event handlers 
Javascript :: React S3 Bucket 
Javascript :: react multiple classname 
Javascript :: how to rename zip file nodejs 
Javascript :: chrome resize window javascript 
Javascript :: add object to array javascript 
Javascript :: double ?? js 
Javascript :: horizontal tabs in react js 
Javascript :: split() js 
Javascript :: re init data vue js 
Javascript :: sequelize db:create test environment 
Javascript :: caching in javascript 
Javascript :: js replace whole word and not words within words 
Javascript :: lodash sum 
Javascript :: convert string to boolean in javascript 
Javascript :: ajax add custom header 
Javascript :: push array into array javascript 
Javascript :: axios get array of urls 
Javascript :: one line if statement javascript 
Javascript :: Program to find GCD or HCF of two numbers javascript 
Javascript :: how to use axios 
Javascript :: NextJS add lang attribute to HTML tag 
Javascript :: get all objects from s3 bucket nodejs 
Javascript :: jest write test for function 
Javascript :: check property exists in object javascript 
Javascript :: react native radio buttons 
Javascript :: vue js set array value by key 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =