Add --skip-welcome flag to web server and serve script

The serve script now opens with ?skip-sessions-welcome to bypass
the sign-in overlay during manual testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Osvaldo Ortega
2026-03-05 11:16:31 -08:00
parent 17a5f769e8
commit c677691c87
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ const APP_ROOT = path.join(__dirname, '..');
async function main() {
const args = minimist(process.argv.slice(2), {
boolean: ['help', 'no-open'],
boolean: ['help', 'no-open', 'skip-welcome'],
string: ['host', 'port'],
});
@@ -86,7 +86,8 @@ async function main() {
server.listen(PORT, HOST, () => {
console.log(`\n Sessions Web running at: http://${HOST}:${PORT}/\n`);
if (!args['no-open'] && args.open !== false) {
open.default(`http://${HOST}:${PORT}/`);
const query = args['skip-welcome'] ? '?skip-sessions-welcome' : '';
open.default(`http://${HOST}:${PORT}/${query}`);
}
});