24/11/20 ‘Sign up’

Acebookgroup2
2 min readNov 24, 2020

Joe has started on the ‘sign up’ page of our Acebook web app.

To do this, Joe created a handlebars file in our ‘views’ folder called ‘signup.hbs’. In this file, we will be writing the html code which will hold our forms so that users are able to sign up to the web app (as outlined in our User Stories). For now, it’s a simple form where users are able to fill in their first and last name, create a password, select their gender, fill in their date of birth and it also has a text box where users can fill in extra information about themselves. By using placeholder attributes, this tells the user what each box is designated for, as seen in the image below.

Sign up page for Acebook.
html code in our /views/signup.hbd

Now that the html for the web app has been written, we needed to be able to create and display the webpage in /signup. Firstly in /controllers/home.js, Joe needed to create a signup function containing two parameters of ‘request’ and ‘response’ which requests the http code and also sends it back via express.

New Signup function in /controllers/home.js

In /routes/home.js, this new function is now called in router.get as we are now getting the html code to appear on the web app in /signup.

Calling this new function in a get response to /signup

In the future, we will try storing the ‘post’ data in our mongodb and storing it to the id of the newly created user(s) where it will show up on their own personal profile.

Written by Giorgio

--

--