Swap76 / NodeJS_Mongo_BoilerPlate

CRUD Blog using NodeJS,Express, MongoDB
GNU Affero General Public License v3.0
21 stars 10 forks source link

Add Upvote and Downvote feature for Blogs. #10

Open Swap76 opened 4 years ago

Swap76 commented 4 years ago

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

nik72619c commented 4 years ago

i'll try this one

Swap76 commented 4 years ago

Great @nik72619c :-)

nik72619c commented 4 years ago

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

nik72619c commented 4 years ago

I was a little confused on the MongoDB atlas part

Swap76 commented 4 years ago

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 :-)

nik72619c commented 4 years ago

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

nik72619c commented 4 years ago

15708048026001672712587317444415 These errors were there before editing the code.

Swap76 commented 4 years ago

@

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

Yes any url for testing is fine

Swap76 commented 4 years ago

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

nik72619c commented 4 years ago

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

nik72619c commented 4 years ago

kindly check

nik72619c commented 4 years ago

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 :)

Swap76 commented 4 years ago

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"
  }
}
nik72619c commented 4 years ago

Cool , thanks