diff --git a/.gitignore b/.gitignore index d2dc06c2e331003547f41dd91b5832a620dc4ac4..78d2dbe3e90c9e36b49ee8a5f00b15f19d547ce3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ node_modules *.env -!template.env \ No newline at end of file +!template.env + +/dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5c9a2796e1ebb8731288c65a78d37056ad20d897..b3cc18cf21a6cfb0a3f84ef6a63bf3c9d5e7ba3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,6 @@ RUN npm install # Bundle app source COPY . . -CMD npm run start:dev +CMD npm run start:prod EXPOSE 3000 diff --git a/src/app.module.ts b/src/app.module.ts index 07fb7a720466704e62f8b1297db4bbb3408e327f..4f31d5292a33ffdd21c899083c2b51888789a5bc 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -2,8 +2,8 @@ import { Module, MiddlewareConsumer, RequestMethod } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { AuthenticationModule } from './authentication/authentication.module'; -import { ConfigModule } from 'configuration/config.module'; -import { untokenize } from 'authentication/token.middleware'; +import { ConfigModule } from './configuration/config.module'; +import { untokenize } from './authentication/token.middleware'; @Module({ imports: [ConfigModule, AuthenticationModule], diff --git a/src/authentication/authentication.controller.ts b/src/authentication/authentication.controller.ts index c46684f6cc0073a6f79f1434ca14e2592f252788..8f5e1fb673ed92707b160485609105bec2b91b26 100644 --- a/src/authentication/authentication.controller.ts +++ b/src/authentication/authentication.controller.ts @@ -3,7 +3,7 @@ import { Controller, Get, Res, Param, Query, Body, Post, HttpCode, InternalServe import { ApiResponse, ApiUseTags, ApiOperation, ApiImplicitHeader } from '@nestjs/swagger'; import { AuthenticationService } from './authentication.service'; -import { handleError } from 'helpers'; +import { handleError } from '../helpers'; import { LoginResponse, TokenResponse, LoginForm, UserUpdateForm, JWTTokenInfo, UserInfoUpdateResponse, UserInfoWithoutPassword } from './authentication.model'; diff --git a/src/authentication/authentication.service.ts b/src/authentication/authentication.service.ts index ba1c10bf47fac9c615f38e7614ad121d87957e6b..a959e1ba1803fd9ad032e9bbd61a875d4ad82886 100644 --- a/src/authentication/authentication.service.ts +++ b/src/authentication/authentication.service.ts @@ -1,5 +1,5 @@ import { Injectable, Logger, BadRequestException, InternalServerErrorException } from '@nestjs/common'; -import { ConfigService } from 'configuration/config.service'; +import { ConfigService } from '../configuration/config.service'; import * as request from 'request-promise-native'; import * as uuid4 from 'uuid/v4'; import * as bluebird from 'bluebird'; @@ -8,7 +8,7 @@ bluebird.promisifyAll(redis); import * as jwt from 'jsonwebtoken'; import { UserInfo, JwtInfo, LoginForm, KongUserJwtCredential, JWTTokenInfo, UserUpdateForm, UserInfoWithoutPassword } from './authentication.model'; -import { handleError } from 'helpers'; +import { handleError } from '../helpers'; @Injectable() export class AuthenticationService {