abaga129 / sveltekit-adapter-iis

15 stars 5 forks source link

Add overrideLogDirectory to Adapter options #15

Closed ablesea closed 9 months ago

ablesea commented 9 months ago

This would allow you to avoid configuring a log directory every time. I'm happy to work on this one.

Add to iisnode config like this:

<iisnode ... logDirectory="C:\My App\logs"/>

Steps

ablesea commented 9 months ago

For now if anyone else is wanting to do the same thing you can inject it by doing something like this:

adapter: IISAdapter({
   overrideNodeExePath: "C:\\Program Files\\nodejs\\node.exe\" logDirectory=\"C:\\My App\\logs",
}),
abaga129 commented 9 months ago

Hey sorry I just saw this. Yeah I think this would be a worthwhile change and shouldn't be too difficult to add. A PR would be welcome!

ablesea commented 9 months ago

I will open one this afternoon

ablesea commented 9 months ago

I think I will go ahead and define an interface for all IISnode properties so that anything else will already be there as well

abaga129 commented 9 months ago

Sounds like a good idea to me. I'm sure there are many things from IIS-node that havent been thought of. My initial implementation just kind of scratched the service of what was needed to get an app in production for my specific use-case. I'm glad to see this being used and extended by others!

ieedan commented 9 months ago

The way I want to do it will be a breaking change. It would add a iisNodeOptions property to adapter options moving overrideNodeExe to the issNodeOptions object

KraXen72 commented 9 months ago

you can introduce the new iisNodeOptions object while keeping the old one and adding a @deprecated jsdoc guiding developers to use the new object. it would be a good idea to only introduce breaking changes on major versions, as per semver. what do you think about this, @abaga129 ?

ieedan commented 9 months ago

you can introduce the new iisNodeOptions object while keeping the old one and adding a @deprecated jsdoc guiding developers to use the new object. it would be a good idea to only introduce breaking changes on major versions, as per semver. what do you think about this, @abaga129 ?

Like this?

/** @deprecated use iisNodeOptions instead */
overrideNodeExePath?: string
abaga129 commented 9 months ago

@KraXen72 good thinking. It's best not to introduce breaking changes if it can be avoided for now.