error when loading the page in an app vue already published

0

I have an App Vue that uses vue-router, to publish it use the following:

  • install express
  • create a server.js file
  • insert the following code
  • CODE

    var express = require('express');
    var path = require('path');
    var serveStatic = require('serve-static');
    
    app = express();
    app.use(serveStatic(__dirname + "/dist"));
    
    var port = process.env.PORT || 5000;
    app.listen(port);
    
    console.log('server started '+ port);
    
  • node server.js
  • This has already been published, but when I press f5 or I reload the page, I can not find the path or directory in the browser, forgive my ignorance but I need help: (

        
    asked by aquispe 18.09.2018 в 21:05
    source

    0 answers