Git Product home page Git Product logo

coffeebros's People

Contributors

bear-coding avatar misterrodger avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

bear-coding

coffeebros's Issues

Not clear instructions

I don't get it, The search doesn't seem to work, and reviews are not being added

I feel like I'm lost, I don't want to say that it is not working application, but that's how it looks like in my browser.
we can't code review any broken sites or not finished codes.

I think you should act like the clients are stupid people who you should explain everything to them, and don't let them suffer by cloning and adding some sentences so it works, please make our life easier

Lovely designs!

Looks wonderful on mobile. You should be able to make it responsive (i.e. look good on desktop) very easily, try removing grid-template-columns: 1fr 1fr 1fr; and adding a sensible max-width.

build index.js

search query (with autocomplete if time allows)
add rating/review

Database build

CoffeeBros

- Places

 - ID
 - name
 - rating
 - address
 - google map

- Review

 - ID
 - place_id
 - comment
 - rating

- Address

 - ID
 - City
 - Street

- Pictures

 - ID
 - Place ID
 - PictureURL

Handler for /search endpoint.

router.js handlers.js
  • handle endpoint | [ ] parse url to get place and city
  • call handler for search | [ ] connect to the db
    ๐Ÿ‘ ๐Ÿ‘ | - [ ] get data and return it

Using setTimeout to make sure database queries have completed

This is a bit of a ๐Ÿ™€- you don't want to rely on an arbitrary number of milliseconds to know when an operation is finished.

You can rewrite this in a clever way using something like a parallel function, or you can use promises instead of callbacks (I know we haven't covered that yet).

But in your case it's actually quite inefficient to be looping through an array and making a database query for each of them. I'm pretty sure you can make use of the power of SQL here and do it all in one query using a clever little JOIN ๐Ÿ˜Ž

Get(Select)/Post(Insert) functions

  • get Reviews
  • get Places
  • get Address By ID
  • get Places By Name
  • get Latest Reviews
  • get Review By Place ID
  • get Pictures By Place ID
  • get Place Details By ID
  • get Map By Place ID
  • get Top Places
  • insert review

Server keep crashing

TypeError: Cannot read property 'address_id' of undefined
at selectQueries.getPlacesByName (/home/karam/Desktop/FACN5/Team-Projects/Week06/Review/CoffeeBros/src/handlers.js:65:50)
at databaseConnection.query (/home/karam/Desktop/FACN5/Team-Projects/Week06/Review/CoffeeBros/database/queries/selectquery.js:8:7)
at Query.client.query (/home/karam/Desktop/FACN5/Team-Projects/Week06/Review/CoffeeBros/node_modules/pg-pool/index.js:300:18)
at Query.handleReadyForQuery (/home/karam/Desktop/FACN5/Team-Projects/Week06/Review/CoffeeBros/node_modules/pg/lib/query.js:125:10)
at Connection. (/home/karam/Desktop/FACN5/Team-Projects/Week06/Review/CoffeeBros/node_modules/pg/lib/client.js:215:19)
at emitOne (events.js:116:13)
at Connection.emit (events.js:211:7)
at TLSSocket. (/home/karam/Desktop/FACN5/Team-Projects/Week06/Review/CoffeeBros/node_modules/pg/lib/connection.js:125:12)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
[nodemon] app crashed - waiting for file changes before starting...

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.