Skip to content

Commit

Permalink
Issue expressjs#5615 using the express instead of http method
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshRsinha committed May 22, 2024
1 parent a7d6d29 commit 203a69d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 14 deletions.
2 changes: 0 additions & 2 deletions examples/auth/views/foot.ejs

This file was deleted.

7 changes: 4 additions & 3 deletions examples/auth/views/login.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@

<h1>Login</h1>
<%- message %>
Try accessing <a href="/restricted">/restricted</a>, then authenticate with "tj" and "foobar".
Try accessing <a href="/restricted">/restricted</a>
<p>Demo accessing :- Username: tj and password: foobar</p>
<form method="post" action="/login">
<p>
<label for="username">Username:</label>
<input type="text" name="username" id="username">
</p>
<p>
<label for="password">Password:</label>
<input type="text" name="password" id="password">
<input type="password" name="password" id="password">
</p>
<p>
<input type="submit" value="Login">
</p>
</form>

<%- include('foot') -%>

5 changes: 3 additions & 2 deletions examples/ejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ app.get('/', function(req, res){

/* istanbul ignore next */
if (!module.parent) {
app.listen(3000);
console.log('Express started on port 3000');
app.listen(3000, () => {
console.log('Express started on port 3000');
});
}
2 changes: 0 additions & 2 deletions examples/ejs/views/footer.html

This file was deleted.

2 changes: 1 addition & 1 deletion examples/ejs/views/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ <h1>Users</h1>
<% }) %>
</ul>

<%- include('footer.html') -%>

2 changes: 1 addition & 1 deletion examples/error-pages/views/404.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%- include('error_header') -%>
<h2>Cannot find <%= url %></h2>
<%- include('footer') -%>

2 changes: 1 addition & 1 deletion examples/error-pages/views/500.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<% } else { %>
<p>An error occurred!</p>
<% } %>
<%- include('footer') -%>

2 changes: 0 additions & 2 deletions examples/error-pages/views/footer.ejs

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"express": "^4.19.2",
"finalhandler": "1.2.0",
"fresh": "0.5.2",
"http-errors": "2.0.0",
Expand Down

0 comments on commit 203a69d

Please sign in to comment.