Skip to content

Server-side scripts to be run on the same instance as MongoDB

License

Notifications You must be signed in to change notification settings

TracesBristol/Server

Repository files navigation

Server

Server-side scripts to be run on the same instance as MongoDB

Server Requirements:

  • NodeJS
  • NPM
  • Python 2.7
  • pip
  • MongoDB

ToDo (on Server):

  • Add Tweepy & Twitter access codes to config.py
  • Modify permission of initScript chmod 700 initScript, and run ./initScript
  • Save/Copy mongod.conf to /etc/mongod.conf on your server
  • Start mongoDB sudo service mongod start
  • Create user accounts with read/write access (see MongoDB Docs and details below)
  • Add username & password (tweetUploader) to index.js file
  • Modify permission of tweetScript chmod 700 tweetScript, and run in background nohup ./tweetScript > tweetScript.out 2>&1 &

MongoDB Users to create

  • admin: roles [ userAdminAnyDB, dbOwner; database: admin, meteor, local ]
  • ventisApp: roles [ readWrite; database: meteor ]
  • tweetUploader: roles [ readWrite; database: meteor ]

Additional MongoDB commands (on Server)

  • start MongoDB: sudo service mongod start
  • stop MongoDB: sudo service mongod stop
  • restart MongoDB: sudo service mongod restart
  • check status: vi /var/log/mongodb/mongod.log
  • edit config: sudo vi /etc/mongod.conf
  • enter mongo console w/admin: mongo --port 3000 -u "<USERNAME>" -p "<PASSWORD>" --authenticationDatabase "admin"
  • enter mongo console w/out admin: in terminal -> mongo --port 3000 ; in mongoshell -> use admin; db.auth("<USERNAME>","<PASSWORD>")

About

Server-side scripts to be run on the same instance as MongoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published