| Level Navigation: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10⚡ | 11⚡ | 12⚡ | 13⚡ | 14⚡ | 15 | 16 | 17 | 18⚡ | 19 | 20 |
User Story: As a developer, I want to serve HTML files from my server so that users can access my Mad Libs form in a web browser.
Set up static file serving to serve HTML files from the public directory.
public/mad-libs-form.html with basic HTML structureNeed help with static files? Check out these snippets:
app.use(express.static('public'))<!DOCTYPE html>, <html>, <head>, <body>app.use(express.static('public'));
<!DOCTYPE html>
<html>
<head>
<title>Mad Libs Form</title>
</head>
<body>
<h1>Welcome to Mad Libs!</h1>
</body>
</html>
public/mad-libs-form.html with basic HTMLhttp://localhost:3000/mad-libs-form.html