Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions