Heroku Cannot GET /

后端 未结 8 451
梦谈多话
梦谈多话 2020-12-03 21:08

I am new to Heroku and believe I am following all of the steps outlined on Heroku\'s website to deploy via node.js – https://devcenter.heroku.com/articles/getting-started-wi

8条回答
  •  暖寄归人
    2020-12-03 21:41

    Adding these two lines in server.js worked for me:

    var distDir = __dirname + "/dist/"; app.use(express.static(distDir));

    My dist structure is as follows:

提交回复
热议问题