Git Product home page Git Product logo

restaurant-reviews's People

Contributors

beaucarnes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

restaurant-reviews's Issues

Cannot delete query

I have been able to post and update query no problem. However when I try to delete, I get a successful response but query still in database

Functions in RestaurantDataService should be static

Hello, the functions inside the RestaurantDataService class should be declared static. Like, static getAll(page = 0){ }. If you don't do this, then JavaScript will not recognize getAll() as a function unless you instantiate an object of type RestaurantDataService.

SyntaxError: Cannot use import statement outside a module

Cannot run server test. The error snippet is below. I copied the code and used my own .env file and got the below result.

Any help would be appreciated.

D:\code\Restaurant Reviews\backend>nodemon server
[nodemon] 2.0.12
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node server index.js
D:\code\Restaurant Reviews\backend\index.js:1
import app from "./server.js"
^^^^^^

SyntaxError: Cannot use import statement outside a module
at Module._compile (internal/modules/cjs/loader.js:892:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11
[nodemon] app crashed - waiting for file changes before starting...

Missing dependencies in package.json

There are two missing dependencies:

  • react-router-dom
  • bootstrap

Due to those missing dependencies, the project won't compile.

Additionally, there are a few missing anchor elements without "href" attribute and rel="noreffer" attribute, causing warnings.

All of the issues were already corrected in my pull request.

issue while running nodemon server

const MongoClient = mongodb.MongoClient
^

SyntaxError: Identifier 'MongoClient' has already been declared

this is thrown when I run the server.
youtube at 23:12

Multiple identical errors with mongodb.ObjectId

Hi, I am currently looking through the tutorial on the backend side and I am running into errors from the reviewsDAO.js file. The error seems to be from const ObjectId = mongodb.ObjectID section and I believe the correct code should be const ObjectId = mongodb.ObjectId.

Additionally, after making this change, the error
TypeError: Class constructor ObjectId cannot be invoked without 'new' is thrown so I believe we have to insert the new keyword before every ObjectId throughout the file.

Only after this, the methods such as GET and PUT works.

If this is not just a personal error and a genuine error, I can open a pull request.

react-router-dom v6

Hi Beau,

In react-router-dom v6 there are a few syntactical changes - e.g Switch to Routes. I was wondering whether it'll be an updated version of MERN on restaurant case study. Great work by the way :)

async mongodb connection error

I am getting this error -> "unable to post review: TypeError: Cannot read property 'insertOne' of undefined"
StackoverFlow says it is because this code here is trying to access insertOne() function before connecting to db
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.