We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AngularClass/angular-websocket requires a url to use the ws:// protocol. If I try to define this via format: 'url' it spews.
ws://
format: 'url'
The text was updated successfully, but these errors were encountered:
Ref: #93
I think you can just use a custom validator.isURL() format and allow ws:// and wss:// protocols. Maybe something like @madarche's #93 (comment):
validator.isURL()
wss://
const validator = require('validator'); convict.addFormat({ name: 'ws-uri', validate: function(val) { if (!validator.isURL(val, {protocols: ['ws', 'wss']})) { throw new Error('must be a web socket URI'); } } }); var conf = convict({ uri: { doc: 'web socket URI', format: 'ws-uri', default: '' } }); conf.load({uri: 'ws://localhost:27017/blah'}); conf.validate({strict: true});
Sorry, something went wrong.
No branches or pull requests
AngularClass/angular-websocket requires a url to use the
ws://
protocol. If I try to define this viaformat: 'url'
it spews.The text was updated successfully, but these errors were encountered: