Tech Junkie Blog: AngularJS SPA Part 5: Create a MongoDB Configuration File

Thursday, March 9, 2017

AngularJS SPA Part 5: Create a MongoDB Configuration File

In the previous blog post be installed mongoDB now, we are going to create a configuration file for mongoDB to use during startup.

In this configuration file we will specify the following:

  • location of the data files
  • log file path
  • the verbosity of the log file

Here are the steps:

  1. Create a folder in your operating systems
  2. create a file call mongo-db-config.config in the folder
  3. Type in the following lines of configuration settings
            dbpath = /techjunkie/mongodb/db
            logpath = /techjunkie/mongodb/mongo-db-server.log
            verbose = vvvvv
           dbpath : specifies the path of the data files
           logpath : specifies the path of the log file
           verbose: specifies how verbose we want out log files to be, in this we want our log files to be very verbose we want to log everything.  The settings is from v to vvvvv  going from least to most verbose

         4. Save the file,  put the path C:\Program Files\MongoDB\Server\3.4\bin into the Environment Variables "Path" varible, now open up the command line utility  type in the following command to use the configuration file

            mongod -f c:\techjunkie\mongodb\mongo-db-config.conf


No comments:

Post a Comment