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
Success: Deploy command completed
Success: Deploy command completed
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
user5754
user5754OP3mo ago
I have other containers hosted on the same domain successfully through cloudflare. It is just this worker
Walshy
Walshy3mo ago
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
user5754
user5754OP3mo ago
It is an angular app. I just want a static page for now
user5754
user5754OP3mo ago
No description
user5754
user5754OP3mo ago
I originally had it as a page, but the results were the same so I tried a worker
Walshy
Walshy3mo ago
Do you have an index.html in the root of your asset dir?
user5754
user5754OP3mo ago
not in the asset dir as that is just images, but in the src dir yes
Walshy
Walshy3mo ago
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?
user5754
user5754OP3mo ago
locally I see the site fine. Deployed I get a 404 and can't navigate anywhere
Walshy
Walshy3mo ago
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 something
user5754
user5754OP3mo ago
I have a build command, I did a screenshot above
Walshy
Walshy3mo ago
and if you run that locally is the configured asset directory showing the assets you expect
user5754
user5754OP3mo ago
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
No description
user5754
user5754OP3mo ago
progress Got it. THanks Had a nested folder

Did you find this page helpful?