Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOENT: no such file or directory #31

Closed
khwerhahn opened this issue Dec 23, 2016 · 2 comments
Closed

ENOENT: no such file or directory #31

khwerhahn opened this issue Dec 23, 2016 · 2 comments

Comments

@khwerhahn
Copy link

I get the following error message: error: (ENOENT) Route: /docs/ - ENOENT: no such file or directory, stat '/usr/src/app/src/docs.html'

In my app.js I have put:

.configure(swagger({
    docsPath: '/docs',
    uiIndex: path.join(__dirname, 'docs.html'),
    info: {
      title: 'A test',
      description: 'A description'
    }
  }))

The feathers app runs in a docker container. I guess it has something to do with creating the docs.html within the container. When I remove the uiIndex:, I get the swagger json output under /docs/.

@daffl
Copy link
Member

daffl commented Dec 23, 2016

You have to create a docs.html as shown in the Readme and the example. path.join(__dirname, 'docs.html') has to be modified to point to the right filename if it is somewhere else outside of the source file folder (__dirname).

@khwerhahn
Copy link
Author

Thanks for the help. Just created a docs.html in the 'src' directory. Docker copies everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants