node.js - Developing locally using express, mongodb and mongoose -
i'm making app using express, mongodb , mongoose, , i'm running locally on machine. problem if i'm not connected internet app won't run @ due app not being able connect mongodb server.
i thought if ran mongodb server locally on computer along app wouldn't need internet connection, or understanding wrong?
any appreciated.
the answer is: yes.
if install mongodb locally won't need internet connection access it.
make sure connection string contains "localhost".
also, make sure don't need else on internet, , run npm install
while connected internet, or otherwise dependencies (like mongoose) won't installed. after installed can work without internet connection fine - if database on localhost.
also, make sure local mongodb server running. can run:
mongo test
in command line see if can connect local database.
Comments
Post a Comment