Question
Pls help me with this Node Js homework. First implement this ejs file. Check out the TODO section and implement it. Given: ejs file: Fall
Pls help me with this Node Js homework.
First implement this ejs file. Check out the TODO section and implement it.
Given:
ejs file:
<% include ../partials/header %> <% include ../partials/menu %>
Fall 2018 Stats
Detailed information on how the Buffs are doing in the 2018 Football Season!
Game Date | Score | Winner | |
---|---|---|---|
Home Score | Opp. Score |
Wins | Losses |
---|---|
Then complete the query function for me:
requirements:
/team_stats - get request (no parameters) This route will require no parameters. It will require 3 postgres queries which will: 1. Retrieve all of the football games in the Fall 2018 Season 2. Count the number of winning games in the Fall 2018 Season 3. Count the number of lossing games in the Fall 2018 Season The three query results will then be passed onto the team_stats view (pages/team_stats). The team_stats view will display all fo the football games for the season, show who won each game, and show the total number of wins/losses for the season.
What I got:
app.get('/team_stats',function(req,res){ //sql statement //exeucute //result to render data res.render('pages/team_stats',{ my_title:"Team stats" })
});
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started