z3r0Luck
4 years ago
2 changed files with 0 additions and 31 deletions
@ -1,31 +0,0 @@ |
|||
<!-- index.ejs --> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<title>Node Js Web App</title> |
|||
</head> |
|||
|
|||
<body> |
|||
<h1>Cloud Computing chat room</h1> |
|||
|
|||
<form action="/quotes" method="POST"> |
|||
<input type="text" placeholder="name" name="name" /> |
|||
<input type="text" placeholder="messages" name="messages" /> |
|||
<button type="submit">Submit</button> |
|||
</form> |
|||
<h2> Messages </h2> |
|||
|
|||
<ul class="messages"> |
|||
<!-- Loop through messages --> |
|||
<% for(var i = 0; i < messages.length; i++) {%> |
|||
< class="message"> |
|||
<!-- Output name from the iterated message object --> |
|||
<span><%= messages[i].name %></span>: |
|||
<!-- Output quote from the iterated quote object --> |
|||
<span><%= messages[i].message %></span> |
|||
</li> |
|||
<% } %> |
|||
</ul> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue