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

93
Views
winston logging http transport no port

I was wondering how I can use winston logging using the http transport, without any specified port?

I have a server and want to send all the error logs to it, but its just http://xx/api/v1/log

But in winston I weirdly enough cannot specify an empty port?

const logger = createLogger({
  level: "debug", 
  format: combine(
    colorize(),
    timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
    format.errors({ stack: true }),
    logFormat
  ),
  transports: [
    new transports.Console(),
    new transports.Http({
      level: "error",
      host: "xxx.herokuapp.com",
      port: undefined, // but this defaults to port 80
      path: "/api/v1/log",
    }),
  ],
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try to use

port: 443

More information here

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!