Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Fill in the gaps in the following server.js code to process data posted from above form, including the code of using middleware to process

image text in transcribed
image text in transcribed
2. Fill in the gaps in the following server.js code to process data posted from above form, including the code of using middleware to process the form's POST submission. Once receive the form, the server should return a JSON string in the following format: [7 marks] message: "Student: fullName (studentNum, Pogram: program) successfully added"} Note: fullName, studentNum, and program represent the values entered by user. var express = require("express"); var app = express(); var var HTTP_PORT = process.env.PORT || 8080; app.use(express.static('public')); app.listen(HTTP_PORT, O => { console.log("Express http server listening on:" + HTTP_PORT); }); Student Number Question 2 (11 Marks): 1. Recreate the html form (right) using valid HTML according to the following specification: (4 marks] Your form MUST submit using "POST" to "/addStudent You are ONLY required to code the form sform>... part, not entire document. No

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

Step: 3

blur-text-image

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Question Can plan participants borrow from a VEBA?

Answered: 1 week ago

Question

Question What is an educational benefit trust and how is it used?

Answered: 1 week ago

Question

Question How are VEBA assets allocated when a plan terminates?

Answered: 1 week ago