1
0
Fork 0
forked from svrjs/svrjs
Commit graph

55 commits

Author SHA1 Message Date
489ec9741a Add process.serverConfig.productName 2024-08-25 17:15:40 +02:00
67658ad329 Lint out the codebase 2024-08-25 17:15:00 +02:00
eaafa8cc41 Add certificate and SNI loading. 2024-08-25 17:11:31 +02:00
b758e11513 Add secondary HTTP server and handlers for primary HTTP server 2024-08-25 17:04:49 +02:00
7b4612e8b0 Move commands in index.js 2024-08-25 16:51:25 +02:00
98c36d2b64 Add commands 2024-08-25 16:47:26 +02:00
a241af753e Server crashes now results in exit code of 1 if errno is not specified. 2024-08-25 16:35:19 +02:00
984c94cd00 Lint out the codebase 2024-08-25 16:25:25 +02:00
21b5f46e9e Add process exit and crash handlers. 2024-08-25 16:23:16 +02:00
6958ec6c94 Remove commented out addMiddleware function. 2024-08-25 15:55:36 +02:00
6302bb0044 Fix problem with hexstrbase64 2024-08-25 15:50:56 +02:00
f05fb50625 Add support for SVR.JS 2.x and 3.x server-side JavaScript. 2024-08-25 15:47:12 +02:00
23508a5292 Added support for SVR.JS 2.x and 3.x mods. 2024-08-25 15:40:53 +02:00
eebada191b Lint out the codebase 2024-08-25 14:24:18 +02:00
aa4e4d0c15 Add "Load SVR.JS mods as middleware" comment. 2024-08-25 14:05:19 +02:00
9d0a156c46 Add mod loader 2024-08-25 14:02:45 +02:00
7decde6b58 Lint out the codebase 2024-08-25 13:10:28 +02:00
fcec27fee1 Replace "SVR.JS" with references to svrjs.json file 2024-08-25 13:09:58 +02:00
5b91c21973 Add CONNECT request (proxy request) handler. 2024-08-25 12:54:36 +02:00
fb7c5ed854 Move core middleware to the request handler. 2024-08-25 12:33:11 +02:00
988ff7c29c Lint out the codebase 2024-08-25 11:57:45 +02:00
60615cdb5a Move handlers to JavaScript files in handler directory. 2024-08-25 11:47:43 +02:00
726d161a64 Add client error handler, and lint out index.js 2024-08-25 11:32:03 +02:00
478c3002f0 Remove "TODO: default handler" comment 2024-08-25 10:33:29 +02:00
0ceded2256 Add static file serving and directory listing functionality. 2024-08-25 10:23:37 +02:00
55d5efe54f Add default handler checks, server status page, sizify() utility function, and move counters from core.js middleware to index.js. 2024-08-25 09:44:53 +02:00
89e9b35829 Add ipBlockList utility function, blocklist functionality, and read from config.json functionality. 2024-08-25 09:12:39 +02:00
2f836231f4 Do some config.json TODO's 2024-08-25 08:32:49 +02:00
5fab894caf Move parts of middleware that checks for forbidden paths to separate utils file, and add tests for them. 2024-08-25 07:13:41 +02:00
983133017f Add some TODO comments for middleware. 2024-08-24 20:47:23 +02:00
3613aa92d2 Add trailing slash redirection middleware. 2024-08-24 20:40:28 +02:00
c1900ee128 Add non-standard codes and HTTP authentication middleware, and SHA256 utility function. 2024-08-24 20:32:06 +02:00
8be7735e71 Refactor code for --reset parameter again. 2024-08-24 19:49:36 +02:00
2e8a4fb042 Refactor command line argument parsing code, and split deleteFolderRecursive function into one JavaScript file. 2024-08-24 19:47:48 +02:00
b9bb16b0ed Add command line options 2024-08-24 19:41:13 +02:00
ca5c22c9c3 Move required modules in index.js 2024-08-24 19:30:25 +02:00
11e7247869 Replace __dirname with process.dirname (declared as __dirname in index.js) 2024-08-24 19:29:12 +02:00
67fec5fe98 Add middleware that checks for forbidden paths. Also add some more placeholder config.json variables. 2024-08-24 17:44:25 +02:00
d688166022 Add middleware responsible for setting response headers (res.setHeader function). 2024-08-24 17:32:27 +02:00
519e68465a Add SVR.JS name and documentation URL to svrjs.json file. 2024-08-24 17:13:59 +02:00
1161256ab9 Create config.generateServerString() function and src/utils/generateServerString.js file. 2024-08-24 17:06:34 +02:00
e1b6ca8803 Change serverconsole.js, so it no longer exports the constructor, just serverconsole object. 2024-08-24 16:58:27 +02:00
3a8cdccc0d Replace configJSON with process.serverConfig. 2024-08-24 16:55:44 +02:00
7a658613fe Added process.singleThreaded flag. 2024-08-24 16:54:28 +02:00
2481e3ed58 Add URL rewriting middleware, and lint out some other middleware. 2024-08-24 08:22:49 +02:00
1929641ba7 Add web root postfixes middleware 2024-08-24 08:02:11 +02:00
53024dfdab Added redirects middleware. 2024-08-23 22:13:58 +02:00
881502d897 Disable console.log for non-TTY stdout 2024-08-23 21:58:26 +02:00
d5c4e9aeaf Fix the baf38ee353 commit. 2024-08-23 21:35:58 +02:00
baf38ee353 Add "throw wwwrootError", for now. 2024-08-23 21:34:58 +02:00