You can automatically recycle the site through IISNode using the watchedFiles
attribute on the iisnode
element in your Web.config
file. I know this isn't through the command line but from your question it seems like this would also solve the problem and not require any manual intervention from someone.
Using the below info, you can set IISNode to watch your config file(s) and whenever they changes IISNode will recycle the site.
watchedFiles - semi-colon separated list of files that will be watched for changes; a change to a file causes the application to recycle;
each entry consists of an optional directory name plus required file name which are relative to the directory where the main application entry point
is located;
wild cards are allowed in the file name portion only; for example: "*.js;node_modules\foo\lib\options.json;app_data*.config.json"
Example iisnode
element from Web.config that will recylce the site whenever the Web.config changes or any .js files in the top level folder of the app.
<iisnode
node_env="%node_env%"
nodeProcessCountPerApplication="1"
maxConcurrentRequestsPerProcess="1024"
maxNamedPipeConnectionRetry="100"
namedPipeConnectionRetryDelay="250"
maxNamedPipeConnectionPoolSize="512"
maxNamedPipePooledConnectionAge="30000"
asyncCompletionThreadCount="0"
initialRequestBufferSize="4096"
maxRequestBufferSize="65536"
uncFileChangesPollingInterval="5000"
gracefulShutdownTimeout="60000"
loggingEnabled="true"
logDirectory="iisnode"
debuggingEnabled="true"
debugHeaderEnabled="false"
debuggerPortRange="5058-6058"
debuggerPathSegment="debug"
maxLogFileSizeInKB="128"
maxTotalLogFileSizeInKB="1024"
maxLogFiles="20"
devErrorsEnabled="true"
flushResponse="false"
enableXFF="false"
promoteServerVars=""
configOverrides="iisnode.yml"
watchedFiles="web.config;*.js"
nodeProcessCommandLine="C:\Program Files (x86)\nodejs\node.exe" />