The speechmatics branch of the /test route destructured only api_key out of the decrypted credential, so testSpeechmaticsStt() passed realtimeUrl: undefined to the sdk. ConnectionConfigFull only applies an override when the value is truthy, so every credential was silently tested against wss://eu2.rt.speechmatics.com/v2 no matter which region was stored - a neu or wus key was judged by whatever eu2 happened to answer. - pass speechmatics_stt_uri through from the route - normalize it before handing it to the sdk. The field holds a bare hostname, which the sdk cannot use as-is: it appends the language, yielding "eu2.rt.speechmatics.com/en" and ERR_INVALID_URL. At call time the same value goes to mod_speechmatics_transcribe as SPEECHMATICS_HOST, which always connects over wss on port 443 with a path of /v2, so build exactly that url. Anything else - a full ws url, a port - now fails the test with an actionable message rather than passing against an endpoint only the test can reach, and a credential that has lost the field fails too: the feature server omits SPEECHMATICS_HOST when it is unset and the module refuses the session, so defaulting to a hosted region here would show a green check on a dead credential. - record the speechmatics STT result with sttTestResult(), not ttsTestResult(), which is what every other STT vendor in this file does; the tts column was being stamped for an STT-only vendor Adds coverage for the url building to the main test suite - it is the part of this that can be exercised without an api key. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
jambonz-api-server 
Jambones REST API server of the jambones platform.
Configuration
Configuration is provided via environment variables:
| variable | meaning | required? |
|---|---|---|
| JWT_SECRET | secret for signing JWT token | yes |
| JWT_EXPIRES_IN | expiration time for JWT token(in minutes) | no |
| ENCRYPTION_SECRET | secret for credential encryption(JWT_SECRET is deprecated) | yes |
| HTTP_PORT | tcp port to listen on for API requests from jambonz-api-server | no |
| JAMBONES_LOGLEVEL | log level for application, 'info' or 'debug' | no |
| JAMBONES_MYSQL_HOST | mysql host | yes |
| JAMBONES_MYSQL_USER | mysql username | yes |
| JAMBONES_MYSQL_PASSWORD | mysql password | yes |
| JAMBONES_MYSQL_DATABASE | mysql data | yes |
| JAMBONES_MYSQL_PORT | mysql port | no |
| JAMBONES_MYSQL_CONNECTION_LIMIT | mysql connection limit | no |
| JAMBONES_REDIS_HOST | redis host | yes |
| JAMBONES_REDIS_PORT | redis port | no |
| RATE_LIMIT_WINDOWS_MINS | rate limit window | no |
| RATE_LIMIT_MAX_PER_WINDOW | number of requests per window | no |
| JAMBONES_TRUST_PROXY | trust proxies, must be a number | no |
| JAMBONES_API_VERSION | api version | no |
| JAMBONES_TIME_SERIES_HOST | influxdb host | yes |
| JAMBONES_CLUSTER_ID | cluster id | no |
| HOMER_BASE_URL | HOMER URL | no |
| HOMER_USERNAME | HOMER username | no |
| HOMER_PASSWORD | HOMER password | no |
| K8S | service running as kubernetes service | no |
| K8S_FEATURE_SERVER_SERVICE_NAME | feature server name(required for K8S) | no |
| K8S_FEATURE_SERVER_SERVICE_PORT | feature server port(required for K8S) | no |
| JAMBONZ_RECORD_WS_USERNAME | recording websocket username | no |
| JAMBONZ_RECORD_WS_PASSWORD | recording websocket password | no |
| DISABLE_RATE_LIMITS | disable rate limiting | no |
Database dependency
A mysql database is used to store long-lived objects such as Accounts, Applications, etc. To create the database schema, use or review the scripts in the 'db' folder, particularly:
- jambones-sql.sql, which creates the schema,
- seed-production-database-open-source.sql, which seeds the database with initial dataset(accounts, permissions, api keys, applications etc).
- create-admin-user.sql, which creates admin user with password set to "admin". The password will be forced to change after the first login.
Note: due to the dependency on the npmjs mysql package, the mysql database must be configured to use sql native authentication.
Running the app
At this point, if you have followed the above instructions, its simply
npm install
node app
The server will listen by default on port 3000, to change this set the HTTP_PORT environment variable:
HTTP_PORT=4000 node app
Running the test suite
To run the included test suite, you will need to have a mysql server installed on your laptop/server. You will need to set the MYSQL_ROOT_PASSWORD env variable to the mysql root password before running the tests. The test suite creates a database named 'jambones_test' in your mysql server to run the tests against, and removes it when done.
MYSQL_ROOT_PASSWORD=foobar npm test
Testing a deployed server
There is a swagger endpoint at http://<your-ip>:3000/swagger that can be used to exercise the APIs. Bearer authentication is required, so you will need an auth token (refer to create-admin-token.sql to see how to generate one).s