Closed sykesd closed 1 year ago
Looks like static assets need to be configured.
The public folder needs to be mounted and the URLs to static assets would need to be updated.
These instructions are how the plugin is meant to be used: https://enhance.dev/docs/learn/deployment/fastify
This plugin was designed to be used as such and not added to the enhance starter project.
I started with the Enhance quick start project. This works exactly as documented.
Following the Fastify docs, I then did the following in my quick start project:
yarn add fastify @enhance/fastify-plugin
"node index.mjs"
to mypackage.json
index.mjs
to the root folder of my project, exactly as described in the docsThe contents of
index.mjs
are:When I launch this, the console shows:
When I visit http://localhost:3000 I see the expected content, but without styling or any images. When I check the developer tools I see that all requests for static content via /_public as well as the request for the CSS /enhance-styles.css all respond with 404.
This is on Windows 10 x64 on node 18.14.2.
I am assuming this is configuration, but I know so little about this that I don't know where to start.
NOTE: I am considering this for internal applications that would be running on internal infrastructure. Deploying to any cloud provider is not an option.