Initial commit: UlHub workspace

This commit is contained in:
ulhub
2026-07-12 01:09:33 +00:00
commit ed2fae9455
931 changed files with 142973 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get()
getHello() {
return this.appService.getHello();
}
}

11
backend/src/app.module.ts Normal file
View File

@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { StatusController } from './status.controller';
@Module({
imports: [],
controllers: [AppController, StatusController],
providers: [AppService],
})
export class AppModule {}

View File

@@ -0,0 +1,11 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class AppService {
getHello() {
return {
message: 'Welcome to UlHub API',
docs: 'GET /api'
};
}
}

10
backend/src/main.ts Normal file
View File

@@ -0,0 +1,10 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api');
await app.listen(3001, '0.0.0.0');
}
bootstrap();

View File

@@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
@Controller('status')
export class StatusController {
@Get()
getStatus() {
return {
status: 'ok',
service: 'UlHub API',
};
}
}