The server is running and getting a lot of request while this route is not working all the other routes are working.
I am picking up error 404 with the following message.
my route works and after a while stops to work I don't know why and how this happens. code example:
/images route
/**
 * Root route, all validation will be done here.
 * TODO:
 */
const { insertImgs,getExisting,getImg } = require('../core/DB.js');
const logger = require( '../logger/logger.js' ).getInstance();
class Images {
    constructor(expressApp) {
        if (!expressApp) throw 'no express app';
        this.router = expressApp;
        this.configure();
    }
    configure() {
        this.router.get('/images',async (req, res, next) => {
            try {
                let images = await getImg(res.locals.config.siteConfig.ID, res.locals.config.siteConfig.ocrLicense)
                /* merge results. */
                return res.status(200).send( images );
            } catch (err) {
                /* log error */
                console.log( 'alts failed', err );
                logger.error({ 
                    type : 'req denied', 
                    route : 'alts', 
                    ip, 
                    key : req.body.key,
                    data : req.body, 
                    error : err 
                });
                return res.status(503).send('Server Maintenance.');
            }
        });
        return this.app;
    }
}
module.exports = {
    Images : Images
}
main.js
const express = require( "express" );
    const cors   = require( "cors" );
    const http   = require( 'http' );
    const config = require( './config.js' );
    const helmet = require("helmet");
    /* routes */
    const { Root } = require('./routes/root.js');
    const { Alt } = require('./routes/alts.js');
    const { Images } = require('./routes/images.js');
    const { Health } = require('./routes/health.js');
    const logger = require('./logger/logger.js').getInstance();
    const app = express();
    const server  = http.createServer(app);
    const port = config.port || 3003;
    app.use( express.json() );
    app.use( express.urlencoded( { extended: true } ) );
    app.use( cors() );
    app.use( helmet() );
    /**
     * init routes.
     */
    [   
        Root,
        Images,
        Alt,
        Health 
    ].forEach(route => {
        new route(app)
    });
    //404 last handler
    app.use((req, res, next)=> {
        res.status(404).send({error: 'Page not found'});
    });
    // error handler
    app.use(function(err, req, res, next) {
        // render the error page
        res.status(err.status || 500);
        res.send('error 404');
    });
    server.listen(port,()=>{
        logger.log({ type : `server startup in process : ${ process.pid }` , port : port });
    });

 
     
     
    