File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ with only a subset of sections having recommendations):
58
58
* Transactions_handling
59
59
60
60
* Development
61
- * Static Assets
61
+ * [ Static Assets] ( ./static-assets.md )
62
62
* Keeping up to date
63
63
* Code Quality
64
64
* [ Code Consistency] ( ./code-consistency.md )
Original file line number Diff line number Diff line change
1
+ ## Static assets
2
+
3
+ For serving static resources we recomend using ` express.static ` middleware.
4
+ Using express.static() method, you can server static resources directly by specifying the folder name where you have stored your static resources.
5
+ Documentation for the middleware can be found in:
6
+
7
+ https://expressjs.com/en/starter/static-files.html
8
+
9
+ ## Caching
10
+
11
+ The static middleware does no server-side caching.
12
+ It lets you do two methods of client-side caching: ETag and Max-Age
13
+ If you configured your static middleware to use client side caching please make sure that
14
+ every modification in your code is represented as different file name.
15
+
16
+ When using bundlers you will explicitly need to generate different file names every time content changes.
17
+ Example for webpack (most popular bundler) can be found here:
18
+
19
+ https://webpack.js.org/guides/caching
You can’t perform that action at this time.
0 commit comments