NodeJS_Mongo_BoilerPlate icon indicating copy to clipboard operation
NodeJS_Mongo_BoilerPlate copied to clipboard

Add Upvote and Downvote feature for Blogs.

Open Swap76 opened this issue 5 years ago • 14 comments

Aim of adding this is go give a glimpse of how transactions should be used in application development with MongoDB.

After Upvote the User ID should be added into the respective array into MongoDB

Swap76 avatar Oct 06 '19 07:10 Swap76

i'll try this one

nik72619c avatar Oct 06 '19 08:10 nik72619c

Great @nik72619c :-)

Swap76 avatar Oct 06 '19 08:10 Swap76

could you please brief me about adding the links in .env file ?

nik72619c avatar Oct 11 '19 09:10 nik72619c

I was a little confused on the MongoDB atlas part

nik72619c avatar Oct 11 '19 09:10 nik72619c

Hey @nik72619c I have added my MongoDB URL link into the .env.example you can use that also but for development have your own link at the place of MONGODB_URL in .env then it will automatically get connected to the MongoDB.

If you need any more help let me know happy to help you :-)

Swap76 avatar Oct 11 '19 12:10 Swap76

Thanks for the help. Would it be okay if I use mlab's url ?

nik72619c avatar Oct 11 '19 13:10 nik72619c

15708048026001672712587317444415 These errors were there before editing the code.

nik72619c avatar Oct 11 '19 14:10 nik72619c

@

Thanks for the help. Would it be okay if I use mlab's url ?

Yes any url for testing is fine

Swap76 avatar Oct 11 '19 16:10 Swap76

15708048026001672712587317444415 These errors were there before editing the code.

Hey @nik72619c please make the branch up to date as recently I have removed the pre-commit hook as it was creating problems

Swap76 avatar Oct 11 '19 16:10 Swap76

@Swap76 the last commit on the master branch was 4 days ago , and I forked the repo yesterday.

nik72619c avatar Oct 11 '19 16:10 nik72619c

kindly check

nik72619c avatar Oct 11 '19 16:10 nik72619c

shall I remove the pre-commit hook myself? I'll include that in my PR as well or will add it as a separate one. Whatever you say :)

nik72619c avatar Oct 11 '19 16:10 nik72619c

Hey @nik72619c sorry from my side I got confused between my repositories

remove the pre-commit hook here I'm pasting the latest pakage.json I have updated right now only if you did not wish to pull the repo then, please have the package.json same

{
  "name": "react_blog",
  "version": "1.0.0",
  "description": "React NodejS App",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon app.js --watch server --exec babel-node",
    "dev": "DEBUG=api:* nodemon app.js --watch server --exec babel-node",
    "lint": "eslint './**/*.js' --fix"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Swap76/NodeJS_Mongo_BoilerPlate"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/Swap76/NodeJS_Mongo_BoilerPlate/issues"
  },
  "homepage": "https://github.com/Swap76/NodeJS_Mongo_BoilerPlate#readme",
  "dependencies": {
    "@sentry/node": "^5.6.2",
    "bcryptjs": "^2.4.3",
    "body-parser": "^1.18.3",
    "bunyan": "^1.8.12",
    "compression": "^1.7.4",
    "cookie-parser": "^1.4.4",
    "cors": "^2.8.5",
    "debug": "^4.1.1",
    "dotenv": "^7.0.0",
    "express": "^4.16.4",
    "helmet": "^3.16.0",
    "joi": "^14.3.1",
    "moment": "^2.24.0",
    "mongoose": "^5.5.2",
    "morgan": "^1.9.1",
    "nodemon": "^1.19.0",
    "npm-run-all": "^4.1.5",
    "passport": "^0.4.0",
    "passport-local": "^1.0.0",
    "validator": "^10.11.0"
  },
  "devDependencies": {
    "@babel/cli": "^7.6.2",
    "@babel/core": "^7.6.2",
    "@babel/node": "^7.6.2",
    "@babel/preset-env": "^7.6.2",
    "eslint": "6.5.1"
  }
}

Swap76 avatar Oct 11 '19 17:10 Swap76

Cool , thanks

nik72619c avatar Oct 11 '19 22:10 nik72619c