Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

453
Views
how to configure nodejs to accept all request from outside of localhost?

I developed an application with NextJs then built it. I run it on node server using 'npm run start' at Powershell. it works fine on localhost on port 80, but my server does not accept any request from outside neither by domain name or IP address. how should I configure application or nodejs to accept all request ?
OS is windows server 2019

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You need to allow CORS

res.header('Access-Control-Allow-Origin', '*');
about 4 years ago · Juan Pablo Isaza Report

0

Try to this cors npm module - https://www.npmjs.com/package/cors

var cors = require('cors');

var app = express();
app.use(cors());

It provides many features to configure cors setting including domain whitelisting, enabling cors for specific apis and many more.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!