1const path = require('path')
2app.use('/static', express.static(path.join(__dirname, 'public')))
3
1//app.get will see only exact match ex.> "/book" here app.get will not allow /book/1, etc
2//but app.use is different see below
3
4//what is difference between app.use and app.all
5//app.use takes only 1 callback while app.all takes multiple callbacks
6//app.use will only see whether url starts with specified path But, app.all() will match the complete path
7
8app.use( "/book" , middleware);
9// will match /book
10// will match /book/author
11// will match /book/subject
12
13app.all( "/book" , handler);
14// will match /book
15// won't match /book/author
16// won't match /book/subject
17
18app.all( "/book/*" , handler);
19// won't match /book
20// will match /book/author
21// will match /book/subject