mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Added bare bones nest app
This commit is contained in:
parent
4f1bf4137d
commit
581ba93cee
4 changed files with 25 additions and 3 deletions
|
@ -1,2 +0,0 @@
|
|||
// Main module file
|
||||
export {};
|
9
ghost/ghost/src/http/controllers/OffersController.ts
Normal file
9
ghost/ghost/src/http/controllers/OffersController.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import {Controller, Get} from '@nestjs/common';
|
||||
|
||||
@Controller('offers')
|
||||
export class OffersController {
|
||||
@Get('')
|
||||
getAll() {
|
||||
return 'Hello, world!';
|
||||
}
|
||||
}
|
|
@ -1 +1,8 @@
|
|||
export * from './ghost';
|
||||
import 'reflect-metadata';
|
||||
import {AppModule} from './nestjs/AppModule';
|
||||
import {NestFactory} from '@nestjs/core';
|
||||
|
||||
export async function create() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
return app;
|
||||
}
|
||||
|
|
8
ghost/ghost/src/nestjs/AppModule.ts
Normal file
8
ghost/ghost/src/nestjs/AppModule.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import {Module} from '@nestjs/common';
|
||||
import {OffersController} from '../http/controllers/OffersController';
|
||||
|
||||
@Module({
|
||||
controllers: [OffersController],
|
||||
providers: []
|
||||
})
|
||||
export class AppModule {}
|
Loading…
Add table
Reference in a new issue