Coder Social home page Coder Social logo

nfl-draft's Introduction

NFL DRAFT README

Inspiration

This was inspired by Key & Peele's "East/West Bowl" comedy sketch(es), though this is the NFL draft (with one round) following the bowl. The players used are from season 2 video. Season 1 video can be found here

(disclaimer: the positions and year/class are made up by me (i.e., not explicity stated in the videos))

This is just a small thing I did as an excuse to mess around with Go for the first time

Routes:

  • /index
  • /players/
  • /test
  • /files/ (use this route to see contents of the /files directory, or go to /files/<file_name><file_extension>)

start:

go run *.go or go build followed by ./nfl_draft

Fetch a player:

curl --request GET --url <base_url>/players/:id

ex: curl --request GET --url http://localhost:8080/players/3

Fetch all players:

curl --request GET --url <base_url>/players/

ex: curl --request GET --url http://localhost:8080/players/

Draft a player:

url: base url id: id of the desired player

curl --request POST --url <base_url>/players/id

ex: curl --request POST --url http://localhost:8080/players/3

TODO

  • "appropriately" handle errors
  • WRITE TESTS
  • make an event table that records what team drafted which player (and when)
  • allow user to add more players to be drafted (from other seasons)
  • write more idiomatic Go
  • swagger docs (or similar) for easy visibility of available routes
  • DONE - reset button to "undraft" all players and start over

postgres:

  • sudo -u postgres psql
  • CREATE DATABASE players_dev;
  • \c players_dev
  • CREATE TABLE players;
  • insert the sample data (found in players.setup.sql)

Resources:

Cool packages I used/learned about:

nfl-draft's People

Contributors

nickbouldien 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.