node-http-server – Diff between revs 34 and 35

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