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

320
Views
Node: Cannot acces to an endpoint

I have no idea about what is happend. I've developed a server who serves information through an API REST. I have defined several endpoints which works without any problem but the end points defined today doesn't work anyone of them.

The code of my router.js is:

import express from "express";
import {Result} from "../com/result";
import config from "../config";
import {getData, getPhotoFromGIATAServer} from "../com/functions";
import {XMLParser} from "fast-xml-parser";
import fs from "fs";

const router = express.Router();

router.post("/api", async (req, res) => {

});

router.post("/api/destinations", async (req, res) => {

});

router.post("/api/country", async (req, res) => {

});

router.post("/api/media", async (req, res) => {

});

router.post("/api/factsheet", async (req, res) => {

});

router.post("/api/texts", async (req, res) => {

});

router.post("/api/update", async (req, res) => {

});

router.post("/api/photo", async (req, res) => {

});

router.post("/api/update/photos", async (req, res) => {
   //Doesn't work
});

router.post("/api/update/texts", async (req, res) => {
    //Doesn't work
});

router.post("/api/update/factsheets", async (req, res) => {
    //Doesn't work
});

module.exports.Router = router;

All the endpoints works fine except the last three ones. When I make a call to one of them I receive a 404 error.

As you can see, the domain and por in both cases are equals but one of them works and the other one not.

enter image description here

enter image description here

enter image description here

enter image description here

I don't understand anything. What is happend? What am I doing wrong?

about 4 years ago · Juan Pablo Isaza
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!