mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 06:00:55 +00:00
Customer Truck Assignment and Portal Delivary Approval
This commit is contained in:
35
apps/edr-freight-api/src/scripts/main.ts
Normal file
35
apps/edr-freight-api/src/scripts/main.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import "reflect-metadata";
|
||||
import { config } from "dotenv";
|
||||
|
||||
config();
|
||||
|
||||
import Vorpal from "vorpal";
|
||||
|
||||
import { NestFactory } from "@nestjs/core";
|
||||
import { AppModule } from "../app.module";
|
||||
|
||||
const vorpal = new Vorpal();
|
||||
|
||||
async function main() {
|
||||
const app = await NestFactory.createApplicationContext(AppModule, {
|
||||
logger: false,
|
||||
});
|
||||
|
||||
try {
|
||||
// registerCommands(vorpal, { app });
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
if (args.length > 0) {
|
||||
await vorpal.exec(args.join(" "));
|
||||
} else {
|
||||
vorpal.parse(process.argv);
|
||||
}
|
||||
} finally {
|
||||
await app.close();
|
||||
}
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error("Script failed:", err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user