add: stand configs

This commit is contained in:
“Naeel”
2026-06-30 15:46:24 +04:00
parent ca276d200f
commit 1a52506fb1
91 changed files with 10766 additions and 0 deletions
@@ -0,0 +1,23 @@
import {ApplicationConfig} from '@loopback/core';
import {Loopback4ExampleGithubApplication} from './application';
/**
* Export the OpenAPI spec from the application
*/
async function exportOpenApiSpec(): Promise<void> {
const config: ApplicationConfig = {
rest: {
port: +(process.env.PORT ?? 3000),
host: process.env.HOST ?? 'localhost',
},
};
const outFile = process.argv[2] ?? '';
const app = new Loopback4ExampleGithubApplication(config);
await app.boot();
await app.exportOpenApiSpec(outFile);
}
exportOpenApiSpec().catch(err => {
console.error('Fail to export OpenAPI spec from the application.', err);
process.exit(1);
});