sit774 web technologies and development 10 1p server database for webs
SIT774 Web Technologies and Development
10.1P: Server Database for Website
In this task, you are required to create a web server that implements a simple
Comments Server, with an interface to a simple database (file) and accepts
requests from a user (client browser). These requests include a GET to display the
contents of the database, and a POST to store a new record in the database.
The database structure (schema) should support a record with the following fields:
To complete this task, you are required to:
1. Make a standalone Node.js program (i.e., a createDB.js file) and execute it on
the Node.js console to create and initialise a server side SQlite3 file database
in the server folder. The database contains a table that is used to store the
data sent from a form page of your own website (as described in the table
2. Make another Node.js program (i.e., a server.js file) in your Node.js server
folder. This program is able to launch the server, accept the data sent from a
form page of your website (in a POST request), save the received data into
the database table, and display the table data upon the request from the client
(i.e., a GET request).
3. Make necessary changes to a form page of your website (can be stored in a
file index.html), so that it is also able to send a data retrieval request (e.g., a
GET request message linked to a Get Users button) to the server in addition
to sending the form data to the server using a POST message linked to a
Save User button.
4. Launch the server by executing the Node.js program you made.
5. Visit the form web page of your website via the local Node.js server (e.g.,
1/2 SIT774 Web Technologies and Development
http://localhost: 3000/ which will retrieve the index.html page) using a web
6. Enter data into the form and submit the form to the server (one or more
times, by clicking a Save User button). The data should be saved in the
server database table.
7. Within the form page, send a data retrieval request (e.g., by clicking a Get
Users button) to the server. After receiving the request, the server retrieves
data from the database table and displays the retrieved data in the browser.
This task is similar to the example provided in the unit site. You will note
the structure of the database table will be different (slightly) and there will
need to be a change to the form inputs to match the `fields' expected in the
What will you submit?
You should submit:
• Source code of the form web page of your website.
• Source code of the Node.js file (i.e., the first createDB.js file) that creates a
server file database with a table in it.
• Source code of the Node.js server program file (i.e., the second server.js file).
• Screenshot of the browser window showing the form web page with entered
• Screenshot of the browser window showing the retrieved data from the
database table after the data retrieval request is sent to the server.
*The amount will be in form of wallet points that you can redeem to pay upto 10% of the price for any assignment. **Use of solution provided by us for unfair practice like cheating will result in action from our end which may include permanent termination of the defaulter’s account.Disclaimer:The website contains certain images which are not owned by the company/ website. Such images are used for indicative purposes only and is a third-party content. All credits go to its rightful owner including its copyright owner. It is also clarified that the use of any photograph on the website including the use of any photograph of any educational institute/ university is not intended to suggest any association, relationship, or sponsorship whatsoever between the company and the said educational institute/ university. Any such use is for representative purposes only and all intellectual property rights belong to the respective owners.