Comments (10)
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.
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 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.
@eevan7a9 I am using version 6.0.2
I added family: 4 but its still not working
from real-estate-management.
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.
@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.
@eevan7a9
Yes I pulled the new change Its still not working, its showing
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.
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.
Yes its working now
@eevan7a9
Thank you for helping
from real-estate-management.
@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)
- Backend Compiling issue HOT 7
- Transforming the Project into a Dockerized Project with Integrated Frontend, Database, and Backend HOT 1
- Backend - Add User Change Password Functionality to Backend HOT 5
- Frontend - Upgrade Angular Version(16) while Maintaining Ionic Compatibility
- Frontend - Integrate Tailwind CSS into Project
- Remove Protractor E2E Tests - Deprecated
- CORS policy error in signin page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from real-estate-management.