mirror of
https://github.com/pockethost/pockethost.git
synced 2026-03-11 03:04:42 +00:00
feat(launcher-spawn): improve URL instructions
This commit is contained in:
5
.changeset/fifty-bears-battle.md
Normal file
5
.changeset/fifty-bears-battle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@pockethost/plugin-launcher-spawn': patch
|
||||
---
|
||||
|
||||
Enhancement: improve URL instructions
|
||||
@@ -68,11 +68,17 @@ const plugin: PocketHostPlugin = async ({}) => {
|
||||
|
||||
/** Display some informational alerts to help the user get started. */
|
||||
onAfterServerStartAction(async () => {
|
||||
info(`Listening for requests on *.${APEX_DOMAIN()}`)
|
||||
const protocol = PORT() === 443 ? 'https' : 'http'
|
||||
const url = new URL(`${protocol}://hello.${APEX_DOMAIN()}`)
|
||||
url.port = `${PORT() === 80 || PORT() == 443 ? '' : PORT()}`
|
||||
info(`Try visiting ${url}`)
|
||||
{
|
||||
const url = new URL(`${protocol}://*.${APEX_DOMAIN()}`)
|
||||
url.port = `${PORT() === 80 || PORT() == 443 ? '' : PORT()}`
|
||||
info(`Listening for requests on ${url}`)
|
||||
}
|
||||
{
|
||||
const url = new URL(`${protocol}://hello.${APEX_DOMAIN()}`)
|
||||
url.port = `${PORT() === 80 || PORT() == 443 ? '' : PORT()}`
|
||||
info(`Try visiting ${url}`)
|
||||
}
|
||||
})
|
||||
|
||||
/** When a request comes in, return an instance based on subdomain */
|
||||
|
||||
Reference in New Issue
Block a user