This file contains hidden or 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: '3' | |
services: | |
my-project-ts: | |
build: . | |
depends_on: | |
- mongodb | |
ports: | |
- '3000:3000' | |
environment: | |
- NODE_ENV=production |
This file contains hidden or 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
FROM node:dubnium-alpine | |
WORKDIR /app | |
COPY . . | |
RUN npm install --no-progress --quiet | |
RUN npm run build | |
CMD [ "npm", "start", "--silent" ] |
This file contains hidden or 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
"start": "node ./dist/index.js" |
This file contains hidden or 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
// at the top | |
import * as config from "config"; | |
// during the db plugin registration | |
server.register(db, config.get('db')); |
This file contains hidden or 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
db: | |
uri: "mongodb://mongodb:27017/vehicles" |
This file contains hidden or 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
db: | |
uri: "mongodb://localhost:27017/vehicles" |
This file contains hidden or 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
npm i config |
This file contains hidden or 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
Show hidden characters
"exclude": ["node_modules", "./src/**/__tests__/*.ts"] |
This file contains hidden or 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
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug jest test", | |
"preLaunchTask": "npm run build", | |
"program": "${workspaceRoot}/node_modules/.bin/jest", | |
"args": [ | |
"--config", | |
"${workspaceRoot}/jest.config.js", | |
"--runInBand", |
This file contains hidden or 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.0.0", | |
"tasks": [ | |
{ | |
"label": "npm run build", | |
"type": "npm", | |
"script": "build", | |
"problemMatcher": [] | |
} | |
] |