公告
财富商城
积分规则
提问
发文
2019-08-16 02:16发布
迷人小祖宗
I am trying to deploy my angular 6 app on Heroku, After building the project and following all the steps of deploy, I get this result on heroku:
and th Heroku logs is :
when testing the deploy address, we get this result:
Your help is highly appreciated
You will have to add wildcard get route in server.js as:
get
server.js
app.use(express.static(__dirname + '/dist')); app.get('/*', function(req, res) { res.sendFile(path.join(__dirname + '/dist/index.html')); });
Solution 2
add one index.php file in dist folder add following code in it:
index.php
<?php header( 'Location: /index.html' ) ; ?>
It will deploy your application.
最多设置5个标签!
You will have to add wildcard
get
route inserver.js
as:Solution 2
add one
index.php
file in dist folder add following code in it:It will deploy your application.