skip to Main Content

MySQL Container keep not connecting to my container – Docker

I'm starting mysql server using docker-compose here is my docker-compose.yml file: version: "3.9" services: mysqldb: image: mysql:8.0 container_name: mysqlcontainer command: --default-authentication-plugin=mysql_native_password restart: unless-stopped volumes: - ./db/init.sql:/docker-entrypoint-initdb.d/0_init.sql - C:/Users/crisp/OneDrive/Desktop/html/database:/var/lib/mysql ports: - 8080:3306 expose: - 8080 environment: MYSQL_DATABASE: todos MYSQL_USER: admin MYSQL_PASSWORD:…

VIEW QUESTION

In Nest js, I added Redis as a cache manager. And can't find any added data in Redis after calling the set function. So, am I missing something?

Node version: v14.15.4 Nest-js version: 9.0.0 app.module.ts Here is the code. In the app module, I am registering Redis as a cache manager. @Module({ imports: [ CacheModule.register({ isGlobal: true, store: redisStore, url: process.env.REDIS_URL, }) ], controllers: [AppController], providers: [AppService], })…

VIEW QUESTION

Mongodb – NodeJS to Mongo DB Atlas not connecting

I'm new to NodeJS and am having difficulties connecting to Mongo DB atlas. app.js const mongoose = require("mongoose"); const express = require("express"); const app = express(); require("dotenv").config(); mongoose.connect(process.env.DATABASE, { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex:true, }).then(() => { console.log("DB CONNECTED") }).catch(()…

VIEW QUESTION

Mongodb – Given an id of a document with recursive field `children`, find all documents that reference the document or any of its children

I have a collection of product folders productfolders and a collection of products products. const ProductFolderSchema = new Schema( { folderName: { type: String, required: true }, parent: { type: Schema.Types.ObjectId, ref: 'ProductFolder' }, children: [{ type: Schema.Types.ObjectId, ref: 'ProductFolder'…

VIEW QUESTION
Back To Top
Search