Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

hi i've run following command pm2 start process.json on ec2 AWS.

Here is my process.json file

{
  "script": "serve",
  "env": {
    "PM2_SERVE_PATH": './build',
    "PM2_SERVE_PORT": 5000
  }
}

When I run the pm2 command shown above. I can access the Base URL. But when I type the Sub URLs from browser, it shows a page that contains 404 |The requested path cannot be found.

Below is my file structure

enter image description here

I am generating the project using npm run build then pm2 start process.json

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
261 views
Welcome To Ask or Share your Answers For Others

1 Answer

So the app starts up and you can access the root page? What about your routes? Are they set up properly? Are you using react-routing or something else?

This sounds like a routing issue. Does it only happen on the AWS platform?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...