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

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 35 Rev 37
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$/, 38 /^.+\.jpg$/,
39 /^.+\.gif$/, 39 /^.+\.gif$/,
40 /^.+\.ico$/, 40 /^.+\.ico$/,
41 /^.+\.woff$/, 41 /^.+\.woff$/,
42 /^.+\.woff2$/, 42 /^.+\.woff2$/,
43 /^.+\.map$/, 43 /^.+\.map$/,
44 /^.+\.ttf$/, 44 /^.+\.ttf$/,
45 /^.+\.svg$/, 45 /^.+\.svg$/,
46 /^.*\.md$/, 46 /^.*\.md$/,
47 /^.*\.pdf$/, 47 /^.*\.pdf$/,
48 /^.*\.map$/ 48 /^.*\.map$/
49 ], 49 ],
50 // Any files matching these regular expressions will never be offered. 50 // Any files matching these regular expressions will never be offered.
51 reject: [ 51 reject: [
52 /^\.bashrc$/ 52 /^\.bashrc$/
53 ], 53 ],
54 // Cache expiry time in seconds for various files - a map of seconds 54 // Cache expiry time in seconds for various files - a map of seconds
55 // to cache to regular expressions matching a local filesystem path. 55 // to cache to regular expressions matching a local filesystem path.
56 cache: { 56 cache: {
57 3600: [ 57 3600: [
58 /\.png$/, 58 /\.png$/,
59 /\.jpg$/, 59 /\.jpg$/,
60 /\.js$/, 60 /\.js$/,
61 /\.css$/, 61 /\.css$/,
62 /\.map$/ 62 /\.map$/
63 ], 63 ],
64 60: [ 64 60: [
65 /\/js\/?$/ 65 /\/js\/?$/
66 ] 66 ]
67 }, 67 },
68 // URL re-writing. 68 // URL re-writing.
69 rewrite: { 69 rewrite: {
70 //'index.html' : /^\/((?!(bower_components|js|css|img|doc))|\/)(.+?)$/g 70 //'index.html' : /^\/((?!(bower_components|js|css|img|doc))|\/)(.+?)$/g
71 }, 71 },
72 // The name of the website. 72 // The name of the website.
73 name: 'Wizardry and Steamworks', 73 name: 'Wizardry and Steamworks',
74 }, 74 },
75 ssl: { 75 ssl: {
76 // Whether to enable HTTPs through SSL. 76 // Whether to enable HTTPs through SSL.
77 enable: true, 77 enable: true,
78 // The size of the key to generate for SSL. 78 // The size of the key to generate for SSL.
79 privateKeySize: 1024, 79 privateKeySize: 1024,
80 // 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.
81 address: 'localhost', 81 address: 'localhost',
82 // The port that the HTTPs server will be listening on. 82 // The port that the HTTPs server will be listening on.
83 port: 8080 83 port: 8080
-   84 },
-   85 configuration: {
-   86 // Whether to enable sending the server configuration.
-   87 enable: true,
-   88 // The relative path that must be accessed to retrieve the configuration.
-   89 path: '/configuration'
84 } 90 }
85 } 91 }
86   92