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 | |
| WORKDIR /app | |
| COPY package.json package.json | |
| RUN npm install | |
| COPY . . | |
| ENTRYPOINT [ "npm" ] |
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
| { | |
| "watch": [ | |
| "src" | |
| ], | |
| "ext": "ts", | |
| "ignore": [ | |
| "src/**/*.spec.ts" | |
| ], | |
| "exec": "ts-node -r tsconfig-paths/register src/main.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
| { | |
| "watch": [ | |
| "src" | |
| ], | |
| "ext": "ts", | |
| "ignore": [ | |
| "src/**/*.spec.ts" | |
| ], | |
| "exec": "node --inspect=0.0.0.0 --require ts-node/register --require tsconfig-paths/register src/main.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
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon |
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
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon |
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
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon |
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
| mkdir nestrand | |
| cd nestrand | |
| npm init | |
| # Run through the steps here to set up the package.json | |
| npm install --save @nestjs/common rxjs | |
| npm install --save-dev rimraf typescript @types/node | |
| # I'm assuming you have typescript installed globally, otherwise run: |
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
| mkdir src | |
| touch src/index.ts | |
| touch src/nestrand.module.ts | |
| touch src/random-number.service.ts | |
| touch src/random-number-service-options.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
Show hidden characters
| { | |
| "compilerOptions": { | |
| "target": "es2017", | |
| "module": "commonjs", | |
| "lib": ["es2017", "es7", "es6"], | |
| "declaration": true, | |
| "declarationMap": true, | |
| "sourceMap": true, | |
| "outDir": "./dist", | |
| "rootDir": "./src", |
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
| import { Injectable } from '@nestjs/common'; | |
| import { | |
| defaultRandomNumberServiceOptions, | |
| RandomNumberServiceOptions, | |
| } from './random-number-service-options'; | |
| @Injectable() | |
| export class RandomNumberService { | |
| private options: RandomNumberServiceOptions; |