Browse Source

Chat Room

master
z3r0Luck 4 years ago
parent
commit
0b795e6ba2
  1. 0
      web_app/.dockerignore
  2. 31
      web_app/views/index.ejs.save

0
.dockerignore → web_app/.dockerignore

31
web_app/views/index.ejs.save

@ -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…
Cancel
Save