Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

68
Vistas
App.js functionality loss over public internet using NODE JS AND EXPRESS

Node js + express is displaying great on localhost. My issue is, is that after I display static page which is doing it's job, my app.js script is not firing from the outside world. But when running locally it works like it is suppose to.

    //send html page to user
    app.use(express.static(__dirname + '/node_modules'));
    app.use(express.static('public'));
    app.get('/', function(req, res, next) {
      res.sendFile(__dirname + '/index.html'); //send the file


    });
 //My app 
 // everything below this line does not work

I followed the direction from express but still app.js is not firing from the outside world. Again it hits great on local. Any help that would be greatly appreciated!

https://expressjs.com/en/starter/static-files.html

8 months ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Based on your code, I was able to deduce that you are behind a sockets enabled CDN and it has not cashed your server-side sockets. Turn off cashing if you are actively developing your site.

8 months ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos