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

Move express settings management to a new module #14

Open
wesleytodd opened this issue Jan 30, 2016 · 2 comments
Open

Move express settings management to a new module #14

wesleytodd opened this issue Jan 30, 2016 · 2 comments

Comments

@wesleytodd
Copy link
Member

Another nice module to have would be the settings management that express has:

app.set('foo', 'bar');
app.get('foo') // bar

For the things that express specifically defaults or modifies, for example query parser, I was thinking of just adding a setter registry:

app.setter('foo', function (val) {
  return 'foo' + val;
});
app.set('foo', 'bar');
app.get('foo') // foobar

My main use case here is to also share this functionality to my front end implementation as talked about here: wesleytodd/nighthawk#5

Thoughts feedback?

@wesleytodd
Copy link
Member Author

I made a quick module for this, is there any interest in this?

https://github.com/wesleytodd/store-settings

@wesleytodd wesleytodd changed the title MOAR MODULES: Move express settings management to a new module Move express settings management to a new module Feb 6, 2017
@Download
Copy link

Download commented Feb 6, 2017

Imho this would be very useful. I am looking to use express as the highest level abstraction to define isomorphic/universal apps... Currently both @wesleytodd and myself have basically re-implemented Express' settings module to be compatible with it, but it would be so much better to use the real thing!

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