boxlang-express 0.1.11
Released .
- Added graceful process shutdown:
listen()now registers a JVM shutdown hook so Ctrl-C/SIGTERM/normal exit runsclose()(stopping thehttpServerand, if running, thereloadOnChangewatcher) instead of getting torn down mid-flight — previously the watcher's daemon thread could outlive a killed server.close()is now idempotent, and a bad port bind is caught and reported with a friendly message plusexit(1)instead of a raw stack trace. - Added
res.dump(data)— sends BoxLang's HTMLdump()view of a variable as the response, round-tripped through a temp file sincedump(format="html")only ever writes to the process console under BoxExpress's CLI-basedHttpServer. - Added colored console output (
AnsiColor.bx): the access log gets a gray timestamp, a method colored by verb (GET=cyan,POST=green,PUT/PATCH=yellow,DELETE=red, everything else=magenta), and a dim IP; thereloadOnChangerestart notice is cyan; fatal/error lines are red. RespectsNO_COLOR— set it to get plain text, e.g. when piping stdout to a file or log aggregator. - Broadened test coverage:
PUT/PATCH/DELETE/all()routing,res.header()/type()/end()/sendBytes(),req.get()/rawExchange()/ip()(including thetrust proxyX-Forwarded-Forcase),app.param(),res.redirect()with an explicit status, andclose()idempotency — plus a newProcessLifecycleSpec.bxcovering behavior that needs a real OS process boundary (port-conflict exit code, SIGTERM releasing the socket,reloadOnChangeactually replacing the process). The test suite'sHttpClient.bxhelper moved fromHttpURLConnectiontojava.net.http.HttpClient, since the former hard-rejectsPATCH.