There are 4 ways to restart a running Pode server:
- Ctrl+R: If you press
Ctrl+Ron a running server, it will trigger a restart to take place. 1a. On Unix you can use
- File Monitoring: This will watch for file changes, and if enabled will trigger the server to restart.
- Auto-Restarting: Defined within the
server.psd1configuration file, you can set schedules for the server to automatically restart.
Restart-PodeServer: This function lets you manually restart Pode from within the server.
When the server restarts, it will re-invoke the
-ScriptBlock supplied to the
Start-PodeServer function. This means the best approach to reload new modules/scripts it to dot-source/
Use-PodeScript your scripts into your server, as any changes to the main
scriptblock will not take place.