node-http-server – Blame information for rev 35
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
15 | office | 1 | // Main configuration file. |
7 | office | 2 | module.exports = { |
15 | office | 3 | // Network related settings. |
7 | office | 4 | net: { |
15 | office | 5 | // The address or hostname that the HTTP server will be listening on. |
7 | office | 6 | address: 'localhost', |
15 | office | 7 | // The port that the HTTP server will be listening on. |
7 | office | 8 | port: 8070, |
9 | }, |
||
10 | log: { |
||
15 | office | 11 | // The relative path to where to place the server log file. |
7 | office | 12 | file: 'logs/server.log', |
13 | }, |
||
15 | office | 14 | // Authentication settings. |
7 | office | 15 | auth: { |
17 | office | 16 | // The web locations that require authentication. |
15 | office | 17 | locations: [ |
7 | office | 18 | '/admin/' |
19 | ], |
||
15 | office | 20 | // The authentication realm. |
7 | office | 21 | realm: 'Wizardry and Steamworks', |
15 | office | 22 | // The path to the password digset file containing users and passwords. |
7 | office | 23 | digest: 'auth/htpasswd', |
24 | }, |
||
25 | site: { |
||
15 | office | 26 | // The document index that will be served when a directory is requested. |
7 | office | 27 | index: 'index.html', |
17 | office | 28 | // The web locations for which sending a directory index is allowed. |
29 | indexing: [ |
||
20 | office | 30 | '/js/' |
17 | office | 31 | ], |
20 | office | 32 | // Any file matching these regular expressions will be offered. |
33 | accept: [ |
||
34 | /^.+\.html$/, |
||
35 | /^.+\.css$/, |
||
36 | /^.+\.js$/, |
||
21 | office | 37 | /^.+\.png$/, |
35 | office | 38 | /^.+\.jpg$/, |
39 | /^.+\.gif$/, |
||
28 | office | 40 | /^.+\.ico$/, |
41 | /^.+\.woff$/, |
||
42 | /^.+\.woff2$/, |
||
43 | /^.+\.map$/, |
||
44 | /^.+\.ttf$/, |
||
33 | office | 45 | /^.+\.svg$/, |
35 | office | 46 | /^.*\.md$/, |
47 | /^.*\.pdf$/, |
||
48 | /^.*\.map$/ |
||
20 | office | 49 | ], |
50 | // Any files matching these regular expressions will never be offered. |
||
22 | office | 51 | reject: [ |
20 | office | 52 | /^\.bashrc$/ |
53 | ], |
||
35 | office | 54 | // Cache expiry time in seconds for various files - a map of seconds |
55 | // to cache to regular expressions matching a local filesystem path. |
||
56 | cache: { |
||
57 | 3600: [ |
||
58 | /\.png$/, |
||
59 | /\.jpg$/, |
||
60 | /\.js$/, |
||
61 | /\.css$/, |
||
62 | /\.map$/ |
||
63 | ], |
||
64 | 60: [ |
||
65 | /\/js\/?$/ |
||
66 | ] |
||
67 | }, |
||
68 | // URL re-writing. |
||
28 | office | 69 | rewrite: { |
35 | office | 70 | //'index.html' : /^\/((?!(bower_components|js|css|img|doc))|\/)(.+?)$/g |
28 | office | 71 | }, |
15 | office | 72 | // The name of the website. |
7 | office | 73 | name: 'Wizardry and Steamworks', |
74 | }, |
||
75 | ssl: { |
||
15 | office | 76 | // Whether to enable HTTPs through SSL. |
7 | office | 77 | enable: true, |
15 | office | 78 | // The size of the key to generate for SSL. |
7 | office | 79 | privateKeySize: 1024, |
15 | office | 80 | // The address or hostname that the HTTPs server will be listening on. |
7 | office | 81 | address: 'localhost', |
15 | office | 82 | // The port that the HTTPs server will be listening on. |
7 | office | 83 | port: 8080 |
84 | } |
||
85 | } |