Skip to content

root should not be optional, and should be the first argument.#1

Open
yields wants to merge 2 commits intodvv:masterfrom
yields:master
Open

root should not be optional, and should be the first argument.#1
yields wants to merge 2 commits intodvv:masterfrom
yields:master

Conversation

@yields
Copy link

@yields yields commented May 30, 2012

root is now the first argument, mount(point) is an option inside options
and defaults to /.

these changes make it possible to merge this excellent server into Rounded.

@dvv
Copy link
Owner

dvv commented Jun 4, 2012

Hi! Sorry for delay, i'm suffering connectivity issues.
Can you elaborate on the purpose of these changes?
TIA,
--Vladimir

@yields
Copy link
Author

yields commented Jun 5, 2012

this change seems right to me, i did it because root must be given and the mount can be defaulted.
with the current setup if the user wants to set the root he must pass the mount point.
for example:

static('/', {root: __dirname})

in my change he can just pass the root while the mount point can be defaulted.

static(__dirname)

@dvv
Copy link
Owner

dvv commented Jun 23, 2012

i'm feeling like a middleware layer should explicitly define key parameters, the URL it's mounted on being the most important one. so far i tend to stay untouched, sorry. can you mangle your call to static middleware?

thank you for heads up,
--Vladimir

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

Successfully merging this pull request may close these issues.

2 participants