Skip to content

Instantly share code, notes, and snippets.

View yaroslavTsebro's full-sized avatar
🎰

Yaroslav Tsebro yaroslavTsebro

🎰
View GitHub Profile
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Post()
getHello(@Body() album: Feature): string {
console.log(album);
return this.appService.getHello();
}
}
import { Injectable } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
@Injectable()
export class AccessTokenGuard extends AuthGuard('jwt') {}
@yaroslavTsebro
yaroslavTsebro / Dockerfile.dev
Last active August 1, 2023 05:15
ts-node nodemon docker debug-mode
FROM node:18
WORKDIR /usr/app
RUN npm install nodemon bcrypt -g
COPY package*.json ./
RUN npm install --force
COPY . ./
EXPOSE 3000
CMD [ "npm", "run", "start-dev" ]
mongo-express | Welcome to mongo-express
mongo-express | ------------------------
mongo-express |
mongo-express |
mongo-express |
mongo-express | (node:7) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
mongo-express | Could not connect to database using connectionString: mongodb://root:example@mongodb:27017/"
mongo-express | (node:7) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongodb:27017] on first connect [Error: connect ECONNREFUSED 172.19.0.2:27017
mongo-express | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
mongo-express | name: 'MongoNetworkError'