Skip to content

Instantly share code, notes, and snippets.

View vschoener's full-sized avatar
💭
New Year's resolution coming :)

Vincent Schoener vschoener

💭
New Year's resolution coming :)
View GitHub Profile
@vschoener
vschoener / docker-compose.yml
Created January 5, 2019 00:42 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
{
"watch": ["src"],
"ext": "ts",
"exec": "ts-node ./src/boot.ts"
}
@vschoener
vschoener / Dockerfile
Created November 8, 2019 12:32
build stage
#
# 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 ./
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';
@vschoener
vschoener / Dockerfile
Last active April 29, 2020 14:48
Multi Stage docker file example with NODE
#
# 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 ./
@vschoener
vschoener / Dockerfile
Last active April 29, 2020 14:48
Dockerfile stage production
#
# 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
#
# 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 ./
@vschoener
vschoener / tsconfig
Created August 10, 2020 11:59
tsconfig for Medium Setup TypeScript project with art
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "es2019",
@vschoener
vschoener / .prettierc
Created August 10, 2020 12:10
prettierc Medium Setup TypeScript project with art
{
"singleQuote": true,
"trailingComma": "all"
}
@vschoener
vschoener / .eslintrc
Last active August 10, 2020 13:05
eslintrc Medium Setup TypeScript project with art
{
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/errors",