Host A Static Web UI
Install the module in your project by running
npm i @fastify/static
from inside your project directory.Register
@fastify/static
with the server and set root
to the absolute path of the directory that contains the static files to serve.module.exports = async (server, { hdbCore, logger }) => {
server.register(require('@fastify/static'), {
root: path.join(__dirname, 'public'),
})
};
Last modified 4mo ago