moleculer-web: assets not work

as Doc , i config it like this:

assets: {
          // Root folder of assets
          folder: "./public",

          // Options to `server-static` module
          options: {}
        },

Then i write a index.html in ./public/index.html, But i try those URL, all can’t get the index.html

/index.html
/api/index.html
/api/public/index.html
/api/public/api/public/index.html
/api/api/public/index.html

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 32 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for your help πŸ‘

But i think it is great. assets path should not start with /api. Please do not change it πŸ˜ƒ

the issue settings:

 mixins: [ApiService],
 settings: {
   path: "/api",
   assets: {
          // Root folder of assets
          folder: path.join(__dirname, "./public"),

          // Options to `server-static` module
          options: {}
        },