Skip to content

znibblol/puntportalen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PuntPortalen

Rebuilding puntportalen from the ground up.


How to install and run.

  1. In server, make a copy of .env.example and rename it to .env
  2. $ openssl genrsa 2048 > private.key (Public and private keys are used for JWT)
  3. $ openssl rsa -in private.key -out public.key -pubout
    In the root folder
  4. $ docker-compose up (Add flag -d for running docker in the background)
  5. $ docker exec pp_server npm run migrate (Migrating the database)
  6. $ docker exec pp_server knex seed:run (Seeding the database with sampla data) // Should probably make a run script for this

You are up and running...

Todo:

  • Update Beerbets when a new beerbet has been posted (wrong with the vuex mutations here)

  • Create server folder
    • Init npm
    • Add express morgan cors body-parser helmet?
    • Add nodemon to dev-dependencies
    • Create 'Hello World' route

  • Create client folder
    • Vue create clinet
    • Add a simple bootstrap theme
    • Create simple homepage layout

  • Add DB to server

    • Add knex perk joi
    • Create documents migration
    • Create documents model
      • Create route to POST document to db
        • Validate document with joi [ ] doc_name [ ] doc_type
        • Insert document to db and public/documents
        • Respond with inserted document
      • Create route to DELETE document
      • Create route to GET documents
    • Create Beerbet migration and seeds
    • Create Beerbet model
      • Create route to POST beerbet to db
        • Validate beerbet with joi
          • condition
          • author
          • type_of
          • completed
          • takers
          • secret
          • payed
          • win/lose
      • Create route to PUT beerbet
        • Validate beerbet with joi
          • condition
          • author
          • type_of
          • completed
          • takers
          • secret
          • payed
          • win/lose
      • Create route to DELETE beerbet
      • Create route to GET beerbets
    • Create pickem model
      • Create route to POST matchups
        • Validate matchups with joi
          • home_team
          • visiting_team
          • date
          • time
      • Create route to POST pickem answers
      • Create route to PUT pickem answers
      • Create route to GET pickem answers
  • Create new document form on client

    • Submit form - fetch POST to server
    • Display errors
    • Show new document on page
  • Create new beerbet form on client

    • Submit form - fetch POST to server
    • Display errors
    • Show new beerbet on page
  • Create update beerbet form on page

    • Submit from - fetch PUT to server
    • Display errors
    • Show updated beerbet on page
  • Create delete button form on page

    • Submit form - fetch DELETE to server
    • Display errors
  • The same for pickem

  • Make autorization

About

Goin to rebuild puntportalen from the ground up.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published