-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharticle-ejs.html
More file actions
211 lines (201 loc) · 8.77 KB
/
article-ejs.html
File metadata and controls
211 lines (201 loc) · 8.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.1/css/all.css" integrity="sha384-xxzQGERXS00kBmZW/6qxqJPyxW3UR0BPsL4c8ILaIWXva5kFi7TxkIIaMiKtqV1Q" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" media="screen and (max-width: 1000px)" href="css/mobile.css">
<link rel="stylesheet" media="screen and (min-width: 1001px)" href="css/widescreen.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<title>technovera | Express.js</title>
</head>
<body>
<nav id="nav">
<div class="nav-container">
<img src="img/logo.png" alt="newsgrid logo" class="logo">
<img src="img/logo-dark.png" alt="newsgrid logo" class="logo-dark">
<div class="social">
<a href="https://facebook.com" target="blank"><i class="fab fa-facebook fa-2x"></i></a>
<a href="https://twitter.com" target="blank"><i class="fab fa-twitter fa-2x"></i></a>
<a href="https://instagram.com" target="blank"><i class="fab fa-instagram fa-2x"></i></a>
<a href="https://youtube.com" target="blank"><i class="fab fa-youtube fa-2x"></i></a>
</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</div>
</nav>
<section class="article-header">
<div id="article-ejs">
</div>
</section>
<section id="article" class="">
<div class="container max-width">
<article class="card">
<div class="">
<h1 class="l-heading">
ExpressJS 5.0: What’s New !
</h1>
<div class="meta">
<small>
<i class="fas fa-user"> Written By Dinesh July 20, 2020</i>
</small>
<div class="category category-ejs">EXPRESS JS</div>
</div>
<p class="mt-2">Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.</p>
<p>ExpressJS is one of the best frameworks for Node.js and it is also a member of the MEAN Stack family which makes it very popular .</p>
<p>There are many version of ExpressJS since the first released from version 0.0.1 which started the project in 2010–01–03 to 4.16.2 in 2017–10–09
Express 5.0 is still in the alpha release stage, but here is a preview of the changes that will be in the release.</p>
<p>Express 5 is not very different from Express 4: The changes to the API are not as significant as from 3.0 to 4.0. Although the basic API remains the same, there are still breaking changes; in other words an existing Express 4 program might not work if you update it to use Express 5.</p>
<p># Installing ExpressJS 5.0
To install the latest alpha and to preview Express 5, enter the following command in your application root directory:</p>
<p>
<code>```bash
$ npm install express@5.0.0-alpha.2 — save
```</code>
</p>
<p>
After installing the newest version you can then run your automated test to see failures and fix the errors according to the updates listed below. After addressing test failures, run your app to see what errors occur. If your app uses any of the deprecated methods the errors will be shown right away.
</p>
<p>
# ExpressJS 5.0 Changelog
Here is the list of changes (as of the alpha 2 release) that will affect you as a user of Express.
# List of Deprecated Things Removed:
</p>
<p>
<code>
*** app.del**
```javascript
app.del(‘/res’, (req, res) => res.send(‘deleted’));
//4: express deprecated app.del: Use app.delete instead
//5: TypeError: app.del is not a function
```
</code>
</p>
<p>
<code>
*** app.param(name)**
```javascript
// Old
app.get(‘/users/:name’, (req, res) => {
res.send(User.find(req.param(‘name’)));
});
//4: express deprecated req.param(name): Use req.params, req.body, or req.query instead
//5: TypeError: req.param is not a function
</code>
</p>
<p>
<code>
// New
app.get(‘/user/:name’, (req, res) => {
res.send(User.find(req.params.name));
});
```
</code>
</p>
<p>
<code>
*** req.acceptsCharset**
```javascript
// The req.acceptsCharset() changes to req.acceptsCharsets) array
req.acceptsCharsets()
```
</code>
</p>
<p>
<code>
*** req.acceptsEncoding**
```javascript
// The req.cceptsEncoding() changes to req.acceptsEncodings() array
req.acceptsEncodings()
```
</code>
</p>
<p>
<code>
*** req.acceptsLanguage**
```javascript
// The req.acceptsLanguage() changes to req.acceptsLanguages() array
req.acceptsLanguages()
```
</code>
</p>
<p>
<code>*** res.json(status, obj) **
```javascript
// The res.status(status).json(obj) changes to res.status(status).json(obj)
res.status(status).json(obj)
```</code>
</p>
<p>
<code>
*** res.jsonp(status, obj) **
```javascript
// The res.jsonp(status, obj) changes to res.status(status).jsonp(obj)
res.status(status).jsonp(obj)
```
</code>
</p>
<p># Conclusion
Express 5 is still in alpha so there are bound to be changes. Take a look at this [pull request](https://github.com/expressjs/express/pull/2237) if you want to see an updated list of changes for release.</p>
</div>
</article>
</div>
</section>
<!-- footer -->
<footer id="footer" class="pt-1">
<div class="container footer-container">
<div>
<img src="img/logo.png" alt="logo light" class="footer-logo">
<img src="img/logo-dark.png" alt="logo dark" class="footer-logo-dark">
<p>technovera is a leading technology media property, dedicated to obsessively profiling web technologies tech news.</p>
</div>
<div>
<h3>EMAIL NEWSLETTER</h3>
<p>Sign Up to our Newletter for latest new and more awesome content!</p>
<form name="contact" action="POST" data-netlify="true">
<input type="email" name="email" placeholder="Enter Email" id="email">
<input class="btn btn-primary subscribe" type="submit" value="Subscribe">
</form>
</div>
<div>
<h3>CATEGORIES</h3>
<ul class="list">
<li><a href="#"><i class="fas fa-chevron-right"></i> React</a></li>
<li><a href="#"><i class="fas fa-chevron-right"></i> JavaScript</a></li>
<li><a href="#"><i class="fas fa-chevron-right"></i> Angular</a></li>
<li><a href="#"><i class="fas fa-chevron-right"></i> Mern</a></li>
</ul>
</div>
<div>
<h3>Follow Us On</h3>
<div class="social">
<a href="https://facebook.com" target="blank"><i class="fab fa-facebook fa-2x"></i></a>
<a href="https://twitter.com" target="blank"><i class="fab fa-twitter fa-2x"></i></a>
<a href="https://linkedin.com" target="blank"><i class="fab fa-linkedin fa-2x"></i></a>
<a href="https://instagram.com" target="blank"><i class="fab fa-instagram fa-2x"></i></a>
<a href="https://youtube.com" target="blank"><i class="fab fa-youtube fa-2x"></i></a>
</div>
</div>
<div>
<p>Copyright © 2020, All Rights Reserved</p>
</div>
</div>
</footer>
<script>
var headerBg = document.getElementById('article-ejs');
window.addEventListener('scroll', function(){
headerBg.style.opacity = 1 - +window.pageYOffset/550+''
headerBg.style.top = +window.pageYOffset+'px';
headerBg.style.backgroundPositionY = - +window.pageYOffset/2+'px';
});
</script>
<script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.6/lib/darkmode-js.min.js"></script>
<script src="js/dark-mode.js"></script>
</body>
</html>