On localhost I'm running a nodejs, express, and handlebars app. It works fine.
However, when I deploy my app on AWS Elastic Beanstalk everything still works except the server can't find an img
that I use.
Here are more details:
In main.handlebars:
<!doctype html>
<html>
<head>
<title>MyApp</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
</head>
<body>
<div class="container">
<header>
<img src="/img/myimage.png" class="img-rounded" alt="Myimage logo">
</header>
</div>
{{{body}}}
</body>
</html>
in app.js:
.
.
app.use(express.static(path.join(__dirname, 'public')));
On AWS EB I am not using a proxy server. I tripled-checked that the img
was zipped up in the source bundle.
Why is my image not found?