π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
Merge branch 'main' into configuration-checking
James Readc766d530406a
diff --cc apps/backend/src/main.tsindex d7b8d4648,7cc0a962e..30f1be83a--- a/apps/backend/src/main.ts+++ b/apps/backend/src/main.ts@@@ -36,27 -35,14 +36,32 @@@ async function bootstrap()loadSwagger(app);const port = process.env.PORT || 3000;- await app.listen(port);- checkConfiguration() // Do this last, so that users will see obvious issues at the end of the startup log without having to scroll up.+ try {+ await app.listen(port);++++ checkConfiguration() // Do this last, so that users will see obvious issues at the end of the startup log without having to scroll up.- Logger.log(`π Application is running on: http://localhost:${port}`);+ Logger.log(`π Backend is running on: http://localhost:${port}`);+ } catch (e) {+ Logger.error(`Backend failed to start on port ${port}`, e);+ }}+function checkConfiguration() {+ const checker = new ConfigurationChecker();+ checker.readEnvFromProcess()+ checker.check()++ if (checker.hasIssues()) {+ for (const issue of checker.getIssues()) {+ Logger.warn(issue, 'Configuration issue')+ }+- Logger.warn("Configuration issues found: " + checker.getIssuesCount() + ". You can run `npm run command config:check` to quickly check again.")++ Logger.warn("Configuration issues found: " + checker.getIssuesCount())+ } else {+ Logger.log("Configuration check completed without any issues.")+ }+}+bootstrap();