Advertisement
XanAung

Second Assignment JavaScript

Sep 26th, 2022 (edited)
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const express = require('express');
  2. const app = express();
  3.  
  4. app.get('', (req, res)=>{
  5.     res.send(`<div><h1><span>About Me</span></h1><p>Hey! I'm <strong>Alex</strong>. Coding has changed my world. It's not just about apps. Learning to code gave me <i>problem-solving skills </i>and a way to communicate with others on a technical level. I can also develop websites and use my coding skills to get a better job. And I learned it all at <strong>National Cyper City</strong> where they build your self-esteem and keep you motivated. Join me in this rewarding journey. You'll have fun, get help, and learn along the way!</p><p>'Declare variables, not war'</p></div><div><h1><span>My Coding Schedule</span></h1><table><tr><th>Day</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th></tr><tr><td>8-8:30</td><td>Learn</td><td></td><td></td><td></td><td></td></tr><tr><td>9-10</td><td></td><td>Practice</td><td></td><td></td><td></td></tr><tr><td>1-1:30</td><td></td><td></td><td>Play</td><td></td><td></td></tr><tr><td>3:45-5</td><td></td><td></td><td></td><td>Code</td><td></td></tr><tr><td>6-6:15</td><td></td><td></td><td></td><td></td><td>Discuss</td></tr></table></div><div><h1><span>My Skills</span></h1><ul><li>HTML <br /><progress min="0" max="100" value="80"></progress></li><li>JavaScript <br /><progress min="0" max="100" value="50"></progress></li><li>Python <br /><progress min="0" max="100" value="30"></progress></li></ul></div><div><h1><span>Contact Me</span></h1><form><input name="name" placeholder="Name" type="text" required /><br/><input name="email" placeholder="Email" type="email" required /><br/><textarea name="message" placeholder="Message" required ></textarea><input type="submit" value="SEND" class="submit" /></form></div><div><h1><span>Follow Me</span></h1><div><a href="#">Github</a><br><a href="#">Facebook</a><br><a href="#">Twitter</a></div></div>`);
  6. });
  7.  
  8. app.get('/about', (req, res)=> {
  9.    res.send("<div><h1><span>About Me</span></h1><p>Hey! I'm <strong>Alex</strong>. Coding has changed my world. It's not just about apps. Learning to code gave me <i>problem-solving skills </i>and a way to communicate with others on a technical level. I can also develop websites and use my coding skills to get a better job. And I learned it all at <strong>National Cyper City</strong> where they build your self-esteem and keep you motivated. Join me in this rewarding journey. You'll have fun, get help, and learn along the way!</p><p>'Declare variables, not war'</p></div>");
  10. });
  11.  
  12. app.get('/coding-schedule', (req, res)=> {
  13.    res.send('<div><h1><span>My Coding Schedule</span></h1><table><tr><th>Day</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th></tr><tr><td>8-8:30</td><td>Learn</td><td></td><td></td><td></td><td></td></tr><tr><td>9-10</td><td></td><td>Practice</td><td></td><td></td><td></td></tr><tr><td>1-1:30</td><td></td><td></td><td>Play</td><td></td><td></td></tr><tr><td>3:45-5</td><td></td><td></td><td></td><td>Code</td><td></td></tr><tr><td>6-6:15</td><td></td><td></td><td></td><td></td><td>Discuss</td></tr></table></div>')
  14. });
  15.  
  16. app.get('/skill', (req, res)=>{
  17.    res.send('<div><h1><span>My Skills</span></h1><ul><li>HTML <br /><progress min="0" max="100" value="80"></progress></li><li>JavaScript <br /><progress min="0" max="100" value="50"></progress></li><li>Python <br /><progress min="0" max="100" value="30"></progress></li></ul></div>')
  18. });
  19.  
  20. app.get('/contact', (req, res)=>{
  21.    res.send('<div><h1><span>Contact Me</span></h1><form><input name="name" placeholder="Name" type="text" required /><br/><input name="email" placeholder="Email" type="email" required /><br/><textarea name="message" placeholder="Message" required ></textarea><input type="submit" value="SEND" class="submit" /></form></div>')
  22. });
  23.  
  24. app.get('/follow-me', (req, res)=>{
  25.    res.send('<div><h1><span>Follow Me</span></h1><div><a href="#">Github</a><br><a href="#">Facebook</a><br><a href="#">Twitter</a></div></div>')
  26. });
  27.  
  28. app.listen(3000, ()=> {
  29.    console.log('Express server is running...');
  30. });
  31.  
  32.  
  33.  
Tags: JavaScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement