Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create Node.js web server that listens port 3000 in the localhost. There is one route that waits request to /home/user end point and it takes

Create Node.js web server that listens port 3000 in the localhost. There is one route that waits request to /home/user end point and it takes two route parameters: name and age. When request arrives, the route parameters are extracted and following message is sent to the response if the age is greater or equals to 18. Welcome {name_param_value}, you're {age_param_value} years old Otherwise, the following message is sent to the response. Hello {name_param_value}, you're too young.

image text in transcribed

Create Node.js web server that listens port 3000 in the localhost. There is one route that waits request to /home/user end point and it takes two route parameters: name and age . When request arrives, the route parameters are extracted and following message is sent to the response if the age is greater or equals to 18. Welcome {name_param_value}, you're {age_param_value} years old Otherwise, the following message is sent to the response. Hello {name_param_value}, you're too young See the screenshots below. Age less than 18: localhost:3000/home/user/John/14 Hello John, you're too young Age greater than 18: f localhost:3000/home/user/John/20 Welcome John, you're 20 years old

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

\f

Answered: 1 week ago

Question

=+management system of the MNE?

Answered: 1 week ago