By mkoretskyi
I’m using Nx workspace with the following directory structure:
apps
courses
nextjs
next-config.js
dist
apps
courses
nextjs
.next
where dist contains built nextjs application as a result of running (build command):
npx nx build courses-nextjs
I tried to run it all locally from the root (deploy command), all works good:
npx next start dist/apps/courses/nextjs
I created WebService app on the platform. Configured build and deploy commands as specified above. The application is created and deployed. I can access the main index.html file, however for all other resources I get 404. What’s the reason for this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Found the problem, for some reason I had HTTP Request Routes setting set for something other than / in my Web Service component. Changed it to root and all worked OK.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.