Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 550d82ae authored by 65160206's avatar 65160206
Browse files

python -m uvicorn src.queues.AutoQueue.Autoqueue:app --host 127.0.0.1 --port 9000 --reload

parent d698c72e
No related branches found
No related tags found
No related merge requests found
...@@ -8,16 +8,19 @@ const child_process_1 = require("child_process"); ...@@ -8,16 +8,19 @@ const child_process_1 = require("child_process");
async function bootstrap() { async function bootstrap() {
const app = await core_1.NestFactory.create(app_module_1.AppModule); const app = await core_1.NestFactory.create(app_module_1.AppModule);
const config = new swagger_1.DocumentBuilder() const config = new swagger_1.DocumentBuilder()
.setTitle('Temperature example') .setTitle('Production Planning API')
.setDescription('The Temperature API description') .setDescription('API for managing production schedules, machines, and workforce in a manufacturing system.')
.setVersion('1.0') .setVersion('1.0')
.addTag('temperature') .addTag('production')
.addTag('machines')
.addTag('orders')
.addTag('employees')
.build(); .build();
const document = swagger_1.SwaggerModule.createDocument(app, config); const document = swagger_1.SwaggerModule.createDocument(app, config);
swagger_1.SwaggerModule.setup('api', app, document); swagger_1.SwaggerModule.setup('api', app, document);
app.useGlobalPipes(new common_1.ValidationPipe()); app.useGlobalPipes(new common_1.ValidationPipe());
app.enableCors(); app.enableCors();
(0, child_process_1.exec)('uvicorn src.queues.AutoQueue.Autoqueue:app --host 127.0.0.1 --port 9000 --reload', (error, stdout, stderr) => { (0, child_process_1.exec)('python -m uvicorn src.queues.AutoQueue.Autoqueue:app --host 127.0.0.1 --port 9000 --reload', (error, stdout, stderr) => {
if (error) { if (error) {
console.error(`❌ Error starting FastAPI: ${error.message}`); console.error(`❌ Error starting FastAPI: ${error.message}`);
return; return;
......
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAiE;AACjE,6CAAyC;AACzC,2CAAgD;AAChD,iDAAqC;AAErC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS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 No newline at end of file
Source diff could not be displayed: it is too large. Options to address this: view the blob.
npm 0 → 100644
...@@ -9,10 +9,15 @@ async function bootstrap() { ...@@ -9,10 +9,15 @@ async function bootstrap() {
// 🔹 เพิ่ม Swagger API Documentation // 🔹 เพิ่ม Swagger API Documentation
const config = new DocumentBuilder() const config = new DocumentBuilder()
.setTitle('Temperature example') .setTitle('Production Planning API')
.setDescription('The Temperature API description') .setDescription(
'API for managing production schedules, machines, and workforce in a manufacturing system.',
)
.setVersion('1.0') .setVersion('1.0')
.addTag('temperature') .addTag('production')
.addTag('machines')
.addTag('orders')
.addTag('employees')
.build(); .build();
const document = SwaggerModule.createDocument(app, config); const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api', app, document); SwaggerModule.setup('api', app, document);
...@@ -25,7 +30,7 @@ async function bootstrap() { ...@@ -25,7 +30,7 @@ async function bootstrap() {
// 🔹 Start FastAPI (Autoqueue.py) พร้อม NestJS // 🔹 Start FastAPI (Autoqueue.py) พร้อม NestJS
exec( exec(
'uvicorn src.queues.AutoQueue.Autoqueue:app --host 127.0.0.1 --port 9000 --reload', 'python -m uvicorn src.queues.AutoQueue.Autoqueue:app --host 127.0.0.1 --port 9000 --reload',
(error, stdout, stderr) => { (error, stdout, stderr) => {
if (error) { if (error) {
console.error(`❌ Error starting FastAPI: ${error.message}`); console.error(`❌ Error starting FastAPI: ${error.message}`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment