diff options
author | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-16 19:14:46 -0700 |
---|---|---|
committer | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-16 19:14:46 -0700 |
commit | cba40b6aff598e821199c186c5f1795e5252bab9 (patch) | |
tree | a5e4ad3bae238c3921e10956f21f84ca352c7d6d /src | |
parent | e5f684001370d6f6348fd26f97bc26c765deb934 (diff) | |
download | locchat-cba40b6aff598e821199c186c5f1795e5252bab9.tar.gz locchat-cba40b6aff598e821199c186c5f1795e5252bab9.zip |
separate client and server apps
Diffstat (limited to 'src')
-rw-r--r-- | src/app.controller.spec.ts | 22 | ||||
-rw-r--r-- | src/app.controller.ts | 12 | ||||
-rw-r--r-- | src/app.module.ts | 22 | ||||
-rw-r--r-- | src/app.service.ts | 8 | ||||
-rw-r--r-- | src/controllers/user.controller.ts | 0 | ||||
-rw-r--r-- | src/entities/user.entity.ts | 0 | ||||
-rw-r--r-- | src/main.ts | 21 | ||||
-rw-r--r-- | src/modules/user.module.ts | 0 | ||||
-rw-r--r-- | src/providers/services/users.service.ts | 0 |
9 files changed, 0 insertions, 85 deletions
diff --git a/src/app.controller.spec.ts b/src/app.controller.spec.ts deleted file mode 100644 index d22f389..0000000 --- a/src/app.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get<AppController>(AppController); - }); - - describe('root', () => { - it('should return "Hello World!"', () => { - expect(appController.getHello()).toBe('Hello World!'); - }); - }); -}); diff --git a/src/app.controller.ts b/src/app.controller.ts deleted file mode 100644 index cce879e..0000000 --- a/src/app.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get } from '@nestjs/common'; -import { AppService } from './app.service'; - -@Controller() -export class AppController { - constructor(private readonly appService: AppService) {} - - @Get() - getHello(): string { - return this.appService.getHello(); - } -} diff --git a/src/app.module.ts b/src/app.module.ts deleted file mode 100644 index dca7dcc..0000000 --- a/src/app.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Module } from '@nestjs/common'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; -import { TypeOrmModule } from '@nestjs/typeorm'; - -@Module({ - imports: [ - TypeOrmModule.forRoot(process.env.NODE_ENV === 'development' ? { - type: 'postgres', - host: 'localhost', - port: 5432, - database: process.env.DATABASE_URL, - autoLoadEntities: true, - } : { - url: process.env.DATABASE_URL, - ssl: { rejectUnauthorized: true } - }) - ], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} diff --git a/src/app.service.ts b/src/app.service.ts deleted file mode 100644 index 927d7cc..0000000 --- a/src/app.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@nestjs/common'; - -@Injectable() -export class AppService { - getHello(): string { - return 'Hello World!'; - } -} diff --git a/src/controllers/user.controller.ts b/src/controllers/user.controller.ts deleted file mode 100644 index e69de29..0000000 --- a/src/controllers/user.controller.ts +++ /dev/null diff --git a/src/entities/user.entity.ts b/src/entities/user.entity.ts deleted file mode 100644 index e69de29..0000000 --- a/src/entities/user.entity.ts +++ /dev/null diff --git a/src/main.ts b/src/main.ts deleted file mode 100644 index 4483c3b..0000000 --- a/src/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { config } from 'dotenv'; -import * as fs from 'fs'; -import { NestFactory } from '@nestjs/core'; -import { AppModule } from './app.module'; - -config(); - -async function bootstrap() { - let httpsOptions; - if (process.env.NODE_ENV === 'development') { - httpsOptions = { - key: fs.readFileSync('./private-key.pem'), - cert: fs.readFileSync('./public-cert.pem'), - } - } - const app = await NestFactory.create(AppModule, { - httpsOptions - }); - await app.listen(process.env.PORT); -} -bootstrap(); diff --git a/src/modules/user.module.ts b/src/modules/user.module.ts deleted file mode 100644 index e69de29..0000000 --- a/src/modules/user.module.ts +++ /dev/null diff --git a/src/providers/services/users.service.ts b/src/providers/services/users.service.ts deleted file mode 100644 index e69de29..0000000 --- a/src/providers/services/users.service.ts +++ /dev/null |