Tips and Tricks in a world of Mix

Posts tagged ‘mongodb’

Image

Activate MongoDB from one bat file

  • Put this code in your bat file
  • It’ll start and activate the mongodb in 2 different admin privileged cmd windows.
  • Please check the paths before to adjust to your environment.

START “runas /user:administrator” cmd /K “cd C:\Program Files\MongoDB\Server\3.4\bin & mongod.exe –dbpath c:\data\db”

TIMEOUT /T 10 START

START “runas /user:administrator” cmd /K “cd C:\Program Files\MongoDB\Server\3.4\bin & mongo.exe “

Advertisements

Mean Stack – message board with authentication demo with Angular2

Heroku Demo online

msgBoard.png

Download Demo at – Github repository with explanations in Readme

angular2_nodejs_connection

Seeder of all levels to work with Node.js Express with MongoDb and Angular2 – each branch different stage. Connecting Angularjs with nodejs

Demo Heroku Deployed

Demo AWS Deployed

Both use mlab.com as a source for MongoDB database

Node.js

Download node.js https://nodejs.org/en/download/ Now we can use npm – node package manager –http://blog.npmjs.org/post/85484771375/how-to-install-npm

First Command Line run to run node.js server

npm run build  

Second Command Line to run the angular client ( views of node for now)

npm start

MongoDB

Download MongoDB https://www.mongodb.com/download-center?jmp=nav#community And install

To use MongoDB after installation add packages

    Ø npm install --save mongoose
    Ø npm install mongoose-unique-validator   (--this one is for unique fields)

For running MongoDB server for me it worked specificly with –dbpath “e:\data\db” only

cd E:\MongoDB\Server\3.2\bin
E:\MongoDB\Server\3.2\bin>mongod.exe --dbpath "e:\data\db"

More there – Github repository with explanations in Readme

 

 

P.S.

The project based on this course

https://www.udemy.com/angular-2-and-nodejs-the-practical-guide

 

Tag Cloud

%d bloggers like this: