Worker has successfully build and deployed but returning 404
I had originally deployed a Hello World! app with a worker to a custom domain and that worked. I then set up a github repo and tried that first with a Page and now with a Worker. In both cases the build is successful and I get in the logs, but now when I go to either the workers.dev URL or my custom domain I get nothing. I have the worker in the DNS records, but still 404. Not sure what I am missing
14 Replies
I have other containers hosted on the same domain successfully through cloudflare. It is just this worker
What is your Worker doing?
Seems like it's loading some assets and things so it's a case of the routing not being setup properly - what framework is this? Seems to be a problem with your code somewhere
It is an angular app. I just want a static page for now

I originally had it as a page, but the results were the same so I tried a worker
Do you have an
index.html in the root of your asset dir?not in the asset dir as that is just images, but in the src dir yes
It'll need to be in whatever your asset directory is defined as
We're likely only seeing your images, if you to an image path - do you see that loaded?
locally I see the site fine. Deployed I get a 404 and can't navigate anywhere
A dev server isn't the same as a built site
This is the answer. Your defined asset directory is what we serve, if there's no index.html in there, we can't serve it
It's possible you aren't building a build command you need to is there an
angular buildor somethingI have a build command, I did a screenshot above
and if you run that locally
is the configured asset directory showing the assets you expect
okay, I am making progress. I misunderstood when you said "assets" folder. I have changed the wrangler file and updated the assests obj as there was another folder in the dist. Now I am getting

progress
Got it. THanks
Had a nested folder