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!

Opposing Team Name
Game Date Score Winner
Home Score Opp. Score
Wins Losses
<% include ../partials/footer %>

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!