Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

321
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda