Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
Gampaha
Thenya Mishel
menuka2000
Updated:
Wednesday at 10:48 PM
Handmade Character Soft Toy Bluey Bingo
anil1961
Updated:
Aug 3, 2026
Colombo
Dahua POE Switch 8 Ports (DH-PFS3010-8ET-65)
hashaz2012
Updated:
Aug 3, 2026
Ad icon
Singapore V2Ray VPN for Tunneling
hu KANNA
Updated:
Jul 31, 2026
Dating Website & Online Chat Room
hotvideo
Updated:
Jul 30, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Software Development
UoM-Open Learning Platform එකේ Server-side web programming එක ඉවර කරපු කවුරු හරි ඉන්නවද ?
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Buzzinga" data-source="post: 28372076" data-attributes="member: 580668"><p>ow bro</p><p></p><p>Dear Students, </p><p></p><p>Congratulations on completing all the lecture topics and the <a href="https://open.uom.lk/mod/hvp/view.php?id=1010" target="_blank">guided project</a> of the course. Here you have an interesting activity based on a use case as an assessment. </p><p></p><p><strong><u>Use case</u></strong></p><p></p><p>A retail shop needs to maintain a product stock and purchase orders through a web</p><p></p><p>application. The customers can submit their orders via the web application. As a backend developer, you</p><p></p><p>need to develop an API to register a customer in the system.</p><p></p><p>Below, please find a sample request and response JSON data for registering a customer.</p><p></p><p><strong>Sample Request JSON for registering a customer</strong></p><p><strong></strong></p><p><strong>[ATTACH=full]190294[/ATTACH]</strong></p><p><strong> Sample Response JSON for a successful registration</strong></p><p>[ATTACH=full]190295[/ATTACH]</p><p><strong>customerId: This should be the generated id from the database</strong></p><p><strong></strong></p><p><strong>1. Update the database.js file with the required data definition (CREATE TABLE statement) to create the</strong></p><p></p><p>data table to store the data of customers</p><p>Table name: customer</p><p><strong>2. Implement a new API in the server.js file to register a customer and add the data record to the table.</strong></p><p></p><p>The method of the API should be POST</p><p>Include the proper error handling</p><p>HTTP error codes</p><p>Success: 201 Created</p><p>An Error: 400 Bad Request</p><p>Reference for HTTP error codes - <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" target="_blank">Link</a></p><p><strong>3. Implement validation to validate POST data to the same API as below</strong></p><p></p><p>Email address validation</p><p>Credit card number validation (12 digits)</p><p><strong>Resources:</strong></p><p>To test the expected outcome, you can pull the codebase from the below repository and edit the relevant files(database.js and server.js)</p><p></p><p>Git repository: <a href="https://github.com/opencourse5tutor/products-api" target="_blank">https://github.com/opencourse5tutor/products-api</a></p><p></p><p><u><strong>Answer Submission Instructions</strong></u></p><p></p><p>Students should submit the following files.</p><ol> <li data-xf-list-type="ol">A screenshot of a successful customer registration using the Postman tool. </li> <li data-xf-list-type="ol">database.js file</li> <li data-xf-list-type="ol">server.js file</li> </ol><p>The customer name should be assigned with the student's name in the customer information. (*Note: Please DO NOT put other personal information such as your email, date of birth, and credit card information as customer data.)</p></blockquote><p></p>
[QUOTE="Buzzinga, post: 28372076, member: 580668"] ow bro Dear Students, Congratulations on completing all the lecture topics and the [URL='https://open.uom.lk/mod/hvp/view.php?id=1010']guided project[/URL] of the course. Here you have an interesting activity based on a use case as an assessment. [B][U]Use case[/U][/B] A retail shop needs to maintain a product stock and purchase orders through a web application. The customers can submit their orders via the web application. As a backend developer, you need to develop an API to register a customer in the system. Below, please find a sample request and response JSON data for registering a customer. [B]Sample Request JSON for registering a customer [ATTACH type="full" width="501px"]190294[/ATTACH] Sample Response JSON for a successful registration[/B] [ATTACH type="full" width="362px"]190295[/ATTACH] [B]customerId: This should be the generated id from the database 1. Update the database.js file with the required data definition (CREATE TABLE statement) to create the[/B] data table to store the data of customers Table name: customer [B]2. Implement a new API in the server.js file to register a customer and add the data record to the table.[/B] The method of the API should be POST Include the proper error handling HTTP error codes Success: 201 Created An Error: 400 Bad Request Reference for HTTP error codes - [URL='https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html']Link[/URL] [B]3. Implement validation to validate POST data to the same API as below[/B] Email address validation Credit card number validation (12 digits) [B]Resources:[/B] To test the expected outcome, you can pull the codebase from the below repository and edit the relevant files(database.js and server.js) Git repository: [URL]https://github.com/opencourse5tutor/products-api[/URL] [U][B]Answer Submission Instructions[/B][/U] Students should submit the following files. [LIST=1] [*]A screenshot of a successful customer registration using the Postman tool. [*]database.js file [*]server.js file [/LIST] The customer name should be assigned with the student's name in the customer information. (*Note: Please DO NOT put other personal information such as your email, date of birth, and credit card information as customer data.) [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom