You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app.listen(3000, () =>console.log('Example app listening on port 3000!'));
55
+
app.listen(3000, () =>console.log("Example app listening on port 3000!"));
56
56
```
57
57
58
58
See [below](#other-servers) for an example of use with fastify.
@@ -82,7 +82,7 @@ or
82
82
webpackDevMiddleware(compiler, {
83
83
headers: () => {
84
84
return {
85
-
'Last-Modified':newDate(),
85
+
"Last-Modified":newDate(),
86
86
};
87
87
},
88
88
});
@@ -93,7 +93,7 @@ or
93
93
```js
94
94
webpackDevMiddleware(compiler, {
95
95
headers: (req, res, context) => {
96
-
res.setHeader('Last-Modified', newDate());
96
+
res.setHeader("Last-Modified", newDate());
97
97
},
98
98
});
99
99
```
@@ -152,7 +152,7 @@ This option also accepts a `Function` value, which can be used to filter which f
152
152
The function follows the same premise as [`Array#filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) in which a return value of `false`_will not_ write the file, and a return value of `true`_will_ write the file to disk. eg.
153
153
154
154
```js
155
-
constwebpack=require('webpack');
155
+
constwebpack=require("webpack");
156
156
constconfiguration= {
157
157
/* Webpack configuration */
158
158
};
@@ -178,10 +178,10 @@ You have to provide `.join()` and `mkdirp` method to the `outputFileSystem` inst
178
178
This can be done simply by using `path.join`:
179
179
180
180
```js
181
-
constwebpack=require('webpack');
182
-
constpath=require('path');
183
-
constmyOutputFileSystem=require('my-fs');
184
-
constmkdirp=require('mkdirp');
181
+
constwebpack=require("webpack");
182
+
constpath=require("path");
183
+
constmyOutputFileSystem=require("my-fs");
184
+
constmkdirp=require("mkdirp");
185
185
186
186
myOutputFileSystem.join=path.join.bind(path); // no need to bind
187
187
myOutputFileSystem.mkdirp=mkdirp.bind(mkdirp); // no need to bind
@@ -212,12 +212,12 @@ Required: `No`
212
212
A function executed once the middleware has stopped watching.
@@ -448,16 +448,16 @@ Examples of use with other servers will follow here.
448
448
Fastify interop will require the use of `fastify-express` instead of `middie` for providing middleware support. As the authors of `fastify-express` recommend, this should only be used as a stopgap while full Fastify support is worked on.
0 commit comments