-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
Currently, the banner is assigned on boot:
var banner =
"######################################################################" +
"# Welcome to joescrabshack.com #" +
"# #" +
"# All connections are monitored and recorded #" +
"# Disconnect IMMEDIATELY if you are not an authorized user #" +
"######################################################################";
vantage
.delimiter('appsvr:3000~$')
.banner(banner)
.listen(3000);However this means that the context can only be when the banner was registered.
Instead, if the api could accept a banner, ie
vantage
.delimiter('appsvr:3000~$')
.banner(() => {
if (process.stdout.columns < 70){
return;
}
return banner;
})
.listen(3000);Then the banner could be changed depending on the app state, or environment state. Some benefiting examples
- process.stdout.columns could be inspected to hide/resize wide banners (this currently only works if the same size shell as what booted the app in the first place is used)
- status of the running application could be returned, maybe a list of the last X exceptions
- Notifications that migrations need to be run
etc
Metadata
Metadata
Assignees
Labels
No labels