Code Monkey home page Code Monkey logo

expressvoting's Introduction

Vote for your favorite dog!

App that allows users to vote for their favorite dog breed. Each user can only vote once and votes are tracked in real time (updated without refreshing the page). Users must be logged in to voting and are placed in a timeout until they can vote again.

How it's made:

  • EJS
  • CSS
  • JS
  • Express
  • MongoDB
  • Mongoose
  • Socket.io
  • Moment
  • auth0

Reflections and Lessons Learned:

This was a really neat exercise in using a new (to me) tech in Socket.io.

Socket was extremely easy to use, and the documentation was very straight-forward which was helpful in getting the application running.

Likewise Moment is very straight forward and very helpful when it comes to formatting, adding and subtracting dates

auth0 was very intuitive and a much easier way to implement users than I am accustomed to. However, I found that integrating it with MongoDB was somewhat messy. Especially, when it came to adding new fields to our user objects in the collection.

My biggest challenge was quite unexpected, which was making a timer that worked and persisted on the front end and was synced up with the back end.

Optimizations

Styling is very bare-bones and needs updating

User profile customization to come

Errors and bugs

If something is behaving weirdly or unexpectedly, it is a bug! Please report it here.

Running locally

  • Create a .env file
  • Add relevant strings to it - PORT, DB_String, auth string...
  • use npm install to install dependencies
  • use npm run start or npm run devStart for nodemon

expressvoting's People

Contributors

magicmarcos avatar

Watchers

 avatar

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.