reasonml-community / bs-express

Express bindings in Reason
MIT License
210 stars 60 forks source link

How can use middlewares like HelmetJS from the app.use? #77

Closed matzero closed 4 years ago

matzero commented 4 years ago

If you wanted to use any middleware like https://helmetjs.github.io/ where in plain js you can do: app.use(helmet()). Assuming that I have binded the helmet() part to ReasonML already would you do Routable.use(helmet()) to recreate the line app.use(helmet()) in plain js?

ncthbrt commented 4 years ago

@matzero You'd want to go App.use(app, helmet()); or Router.use(router, helmet());

matzero commented 4 years ago

Thanks!