Git Product home page Git Product logo

Comments (10)

eevan7a9 avatar eevan7a9 commented on June 18, 2024

after installing the dependencies have you created a ".env" file in the root directory of the "backend-fastify/"?

then add credentials to it?

example:
.env

PORT=8000
LOGGER=true
SALT=12
SECRET_KEY='secret'
DB_CONNECT=mongodb://localhost:27017/rem-db2

from real-estate-management.

chiragbiradar avatar chiragbiradar commented on June 18, 2024

after installing the dependencies have you created a ".env" file in the root directory of the "backend-fastify/"?

then add credentials to it?

example: .env

PORT=8000
LOGGER=true
SALT=12
SECRET_KEY='secret'
DB_CONNECT=mongodb://localhost:27017/rem-db2

Yes I have created .env file
image

Its showing this:
image

from real-estate-management.

eevan7a9 avatar eevan7a9 commented on June 18, 2024

@chiragbiradar What version of mongodb are you using in you local machine?

can you try this on "index.js" on mongoose.connect update the parameter.

  .connect(process.env.DB_CONNECT, {
    useUnifiedTopology: true,
    useNewUrlParser: true,
    family: 4, <--- add this
  }) 

  .then(() => {
    ...

you can also try the answers on stackoverflow:
MongooseServerSelectionError: connect ECONNREFUSED ::1:27017

from real-estate-management.

chiragbiradar avatar chiragbiradar commented on June 18, 2024

@eevan7a9 I am using version 6.0.2
image

I added family: 4 but its still not working

from real-estate-management.

eevan7a9 avatar eevan7a9 commented on June 18, 2024

Is your mongodb up and running smoothly?
type mongo in terminal
ref

if you want you can try my .env

PORT=8000
LOGGER=true
SALT=12
SECRET_KEY='secret'
DB_CONNECT=mongodb+srv://admin-test:[email protected]/?retryWrites=true&w=majority

from real-estate-management.

eevan7a9 avatar eevan7a9 commented on June 18, 2024

@chiragbiradar can you pull the latest changes, I allowed 'uploads/' folder
seems like adding properties is looking for 'uploads/' folder. if it's missing will cause error

from real-estate-management.

chiragbiradar avatar chiragbiradar commented on June 18, 2024

@eevan7a9
Yes I pulled the new change Its still not working, its showing
image

should I change mongodb version?
or I think there is some problem in angular routing. Can you go through it and let me know?

from real-estate-management.

eevan7a9 avatar eevan7a9 commented on June 18, 2024

it's seems like it's getting undefined value from .env

can you try adding the string directly something like this:

mongoose
  .connect('mongodb://localhost:27017/rem-db2', {
    useUnifiedTopology: true,
    useNewUrlParser: true,
  })

does it work if you use the .env I provided?

from real-estate-management.

chiragbiradar avatar chiragbiradar commented on June 18, 2024

Yes its working now
@eevan7a9
Thank you for helping

from real-estate-management.

eevan7a9 avatar eevan7a9 commented on June 18, 2024

@chiragbiradar No worries, I still don't know why you received those undefined errors.

Nonetheless, it's good to know that it's working.

from real-estate-management.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.