0% found this document useful (0 votes)
22 views2 pages

Develop Backend Application With Noode Js

Uploaded by

Habimana Daniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Develop Backend Application With Noode Js

Uploaded by

Habimana Daniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SCHOOL COMPREHENSIVE ASSESSMENT A/Y: 2024-2025 Term:1

EXAM TITLE: Backend Application Development

EXAMINER: ......................................................

SOFTWARE DEVELOPMENT TOTAL MARKS: 70 marks

Class: LEVEL 4 SWD TIME: 3 hours

Date:....../12/2024

Instructions:

This paper Consists of Two sections: A and B

 Section A: Attempt all questions (50 marks)


 Section B: Attempts any 2 (4) questons (20 marks)
 Separate your answer with horizontal line

Addition instruction:

 Calculator & Drawing materials should be used where applicable

Section A: Attempt all questions (55 marks)

1) Define the following terms /5 marks


a) API
b) Express js
c) CORS
d) Middleware
e) Server
2) With example discuss about routing in Express js /5 marks
3)
a) Define what an API is and its role in software development. /1 marks

Page 1 of 2
b) Explain what an endpoint is in the context of web APIs. /2 marks
c) Provide an example of an endpoint you might to retrieve user information based on
their username in a social media application. /2 marks
4) Explain in your own words what a server is in the context of Node.js. Then, write step-by-step
instructions on how to create a basic server using Express.js. /5 marks
5)
a) Define JSON and explain its importance in web development. /2.5 marks
b) How would you convert the following object into a JSON data string? {"title": "Book",
"pages": 200}/2.5 marks
6)
a) Explain what the HTTP GET method is used for in the context of web development. /2.5
marks
b) Write the code to create a simple Express.js route that responds with "Hello, World!"
when a user visits the root URL ("/")./2.5 marks
7) Imagine you're building an API for a weather app. Your API needs an endpoint to retrieve the
current weather. Create an Express.js route that responds with a JSON object containing the
current temperature=23, conditions=sunny, and city:kigali. /5 marks
8) Explain the information typically required for database connection configuration /5 marks
9) What do you understand by npm init and how to implement it /5 marks
10) Explain Error Handling Middleware in Express.js Applications with example/5 marks

SECTION B: Attempt Only 2 (4) questions (20Marks)

1. Discuss the role of Express.js in building RESTful APIs. Provide examples of defining routes and
handling HTTP requests. /10 marks

2. Explain the concept of middleware in Express.js. Discuss various types of middleware and their usage
in web applications. /10marks

3. Describe the integration of MYSQL with Node.js using MYSQL2 /10 marks

4. How can you implement input validation in an Express.js application? Provide an example of a
validation library you might use. /10 marks

End!

Page 2 of 2

You might also like