This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"watch": ["src"], | |
"ext": "ts", | |
"exec": "ts-node ./src/boot.ts" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Builder stage. | |
# This state compile our TypeScript to get the JavaScript code | |
# | |
FROM node:12.13.0 AS builder | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
COPY tsconfig*.json ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Test, TestingModule } from '@nestjs/testing'; | |
import { INestApplication } from '@nestjs/common'; | |
import * as nock from 'nock'; | |
import { Collection } from 'mongodb'; | |
import * as request from 'supertest'; | |
import { AppModule } from '../../src/app.module'; | |
import { getModelToken } from 'src/core/mongodb/mongodb.utils'; | |
import { Snap } from 'src/snaps/model/schema/snaps.schema'; | |
import { DateManager } from 'src/core/utils/date-manager.service'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Builder stage. | |
# This state compile our TypeScript to get the JavaScript code | |
# | |
FROM node:12.13.0 AS builder | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
COPY tsconfig*.json ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Production stage. | |
# This state compile get back the JavaScript code from builder stage | |
# It will also install the production package only | |
# | |
FROM node:12.13.0-alpine | |
WORKDIR /app | |
ENV NODE_ENV=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Builder stage. | |
# This state compile our TypeScript to get the JavaScript code | |
# | |
FROM node:12.16.3 AS builder | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
COPY tsconfig*.json ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"declaration": true, | |
"removeComments": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"allowSyntheticDefaultImports": true, | |
"esModuleInterop": true, | |
"target": "es2019", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"singleQuote": true, | |
"trailingComma": "all" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": true, | |
"env": { | |
"node": true | |
}, | |
"extends": [ | |
"plugin:@typescript-eslint/recommended", | |
"prettier/@typescript-eslint", | |
"plugin:prettier/recommended", | |
"plugin:import/errors", |