Git Product home page Git Product logo

where-to-eat's Introduction

Where to Eat

This is a simple application that I have used to try my hand at node.js and redis. The idea came from a co-worker who asked me if I could build an application to collect the votes of our other co-workers to determine where to eat. This is the result.

There is a full tutorial at http://ejosh.co/de/2015/01/node-js-socket-io-and-redis-intermediate-tutorial-server-side/ and a screencast at https://www.youtube.com/watch?v=-_u0NjmSKgI.

How to use

I tried to keep this as simple as I could (in both programming and use). There are four things that you can do; enter an area, log in, search, and vote.

  • Enter an area.
    area The area is set by the hash in the URL. Enter #test at the end of the URL and you will have entered the test area. Only votes inside of each area are broadcast and tallied.
  • Log in.
    login
    No passwords just a name. Enter a name, email, or facebook username into the textbox. Names and emails will use gravatar to create your avatar. Your facebook image is used like so - fb:username. Yes you can impersonate people, so be on your best behavior.
  • Search.
    search
    FourSquare is used to find restaurants around you. If the restaurant you want is not found just enter the name and search again. The x button will clear all the searched for restaurants off the map.
  • Vote.
    vote
    Click the icon on the map and then click vote. The votes will be tallied and hopefully you will come to a decision.

The areas and votes expire after two hours. You can vote on a lunch spot and everything is cleared out by supper. This is why I am not too concerned about impersonations as everything has an expiration date.

Technologies used

This system uses many different open source software projects.

Tests

Client side Qunit tests are in the jstest folder. It is split into four modules: Josh.Cookie, Josh.Map, Josh.Socket, and React components. Coverage is done with Blanket.js. The tests currently pass in Chrome 20 and Firefox 13. IE 9 is almost there, but you will have a rough time if you use it for this.

Server side mocha test are in the test folder. The repository and Socket.IO code is covered at 90%.

If you want to fork or have pull request please make sure they all pass. If you add anything add a test for it.

Demo

http://thawing-cliffs-6040.herokuapp.com/

where-to-eat's People

Contributors

johanan avatar matthewchung74 avatar wilreichert 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

where-to-eat's Issues

You can add multiple votes

After you have voted once and someone else votes you can then change your vote and add it multiple times.
image

starting the project

I followed the youtube tutorial and thought it was great. What I'm not sure of is how to run the project. When I go to the browser, and go to http://localhost:8080/, I get the 'Hello Socket' which is coming from the handler.

Do I need to add a static route to the index.html file? I feel like I'm just missing something silly. Anyways, any suggestions are welcome. Thanks.

Express routes

Is there anyway to use the socket.js file from other routes? On my login form, users also select a location from a drop down list. In another route (/local), this location will be used as a room to join in socket.io. Basically, I want to join the room when a user goes to the /local route and then populate results from redis via socket.io. Hopefully I explained that clearly.

Thanks

demo broken

mixed content is causing the socket and map functionality to fail on the demo. would be nice to see it working!

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.