Create a nodejs application

Assignment Help Programming Languages
Reference no: EM133004240

SIT774 Web Technologies and Development

User Validation by Using Database

Tasks
In this task you are required to implement a NodeJS server that stores user details in a database for the (fictitious) Deakin Chess Club.
As part of this task you will need to implement a simple Login page. Here the data pasted from the login page can be validated against the data stored in the database on the server.

Steps
1. Create a NodeJS application (i.e., index.js ) which on execution creates an SQLite3 database table (an in memory DB is fine). It should then populate this table with the details of the 5 players shown below:

2. Next, you are to implement a Login form that asks the user for a USERNAME / PASSWORD combination. The user can then POST this data to the server on clicking a button.

An example of a login screen is shown below, although you are free to implement another layout/style.

3. The NodeJS application (the server) must be able to handle the post request through an appropriate route. In processing this login request, the server should search for the given username and compare the password provided by the user with that which is stored in the database.

If they match (login successful), an appropriate response should be provided. This should include information from the user's database record (i.e., the number of wins/losses/draws, etc.). A sample of a valid login is shown below:

Task10.2.3 Possible ‘successful' login message

If the provided USERNAME / PASSWORD combination does not match the that stored in the database, an appropriate unsuccessful response should be provided. A sample of an unsuccessful login is shown below:

Task10.2.4 Possible ‘unsuccessful' login message

When creating the database table, consider the data types of respective fields,

for example:

the ID field should be an integer (see the id INTEGER PRIMARY KEY AUTOINCREMENT attribute in SQLite)
the username should be UNIQUE

The match results should also be INTEGERS as you would like to do calculations on these (e.g., count up the total number of pizzas purchased)

When checking on the USERNAME/PASSWORD in the database, consider using the SELECT command with a WHERE that combines these two inputs as the search field.

Attachment:- Web Technologies and Development.rar

Reference no: EM133004240

Questions Cloud

Determine the amount of the bond interest expense : On the first day of its fiscal year, Jacinto Company issued $13,100,000. Determine the amount of the bond interest expense for the first year.
Approve a plan to assess security controls : Create a presentation (Power Point, LibreOffice Impress, WPS Presentation) showing a minimum of 15 security controls. You are to use the security controls used
Should recognise a liability in accordance with the relevant : From Johnny's point of view, should he recognise a liability in accordance with the relevant Conceptual Framework definition and recognition criteria.
What is the balance in accounts receivable at end of june : Make a monthly schedule of cash receipts for the second quarter of 20x5 and what is the balance in accounts receivable at the end of june?
Create a nodejs application : Create a NodeJS application (i.e., index.js ) which on execution creates an SQLite3 database table (an in memory DB is fine).
Which is the correct set of hypotheses to test statement : Australian mining stocks is less than 12% in the past ten years. Let ??µ be the true average return, which is the correct set of hypotheses to test statement?
Is seed a biological asset-true or false : A biological asset that is previously measured at fair value less costs to sell shall be measured at fair value less costs to sell unit disposed.-TRUE OR FALSE
Current market value of the company equity : A company has its debt structured as a single zero-coupon bond that matures in 5 years. The face value of the debt outstanding is $40 million and the current va
Calculate the price an investor would pay to obtain : Calculate the price an investor would pay to obtain $50,000 of par value in this bond. Coupon Rate: 4.5%, semi-annual payments

Reviews

Write a Review

Programming Languages Questions & Answers

  Applyfunction that receives an array and a function

Write a function called applyFunction that receives an array (arr) and a function (func) as a parameter.

  Create unix shell script to input number of hours worked

Create a Unix shell script to input number of hours worked and pay rate and compute the total pay, then the social security amount (assume 5%), then the net pay.

  Write a program that stores numbers in the given range

Write a program that stores numbers from the range 0 - 1000 in an array. Your program should. Create an array of size 50. Run in two modes and ask the user.

  Create a program to keep track of vehicle tire purchases

Create a program to keep track of vehicle tire purchases. The program will store data about the vehicle, the tire manufacturer and size, quantity purchased, the date of sale, and the mileage warranty, etc.

  Create two objects p and q and generate 10 random numbers

Create Two objects P and Q. in object P the array a is type int and size 10, in Q array a is string type and size 12b. Generate 10 random numbers

  Design of a swing-based booking system

Robustness Analysis in the initial design of a Swing-based booking system for a small restaurant. The restaurant only offers a degustation menu

  Modify the startup code so that the program calls a function

Modify the startup code so that the program calls a function that reads the player's data from the text file into the list of member objects.

  Program that specialized in solving the equations

Write a program that specialized in solving the equations Ax = b by Doolittle's decomposition method, where A is the hilbert matrix of arbitrary size n x n, and bi = the summation of Aij for j = 1 to n.

  Which microsoft os below is the least intrusive

Which Microsoft OS below is the least intrusive to disks in terms of changing data?a. windows 95b. windows xp

  Implement sumpairs and sumof

Using SML writes a version of sumPairs that sums each component of the pairs separately, returning a pair consisting of the sumof the first components and the sum of the second components

  Program which converts fahrenheit to celsius.

Create the following program which converts Fahrenheit to Celsius. Your program must have the following functions: Read integer Fahrenheit temperatures from the user. You need to check whether the input is the correct one or not. If the user enters ..

  Create a class named account with data fields

Create a class named Account with data fields for an account number, payment amount and balance as well as the appropriate set and get methods. Include a constructor method that contains no arguments.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd