pad.libre-service.eu-etherpad/src/node
John McLear a0579c90db APIHandler: return HTTP/404 when non existing API methods are invoked
Before this change, invoking a non existing API method would return an HTTP/200
response with a JSON payload {"code":3,"message":"no such function"}.

This commit changes the HTTP status code to 404, leaving the payload as-is.

Before:
   curl --verbose "http://localhost:9001/api/1/notExisting?apikey=ABCDEF"
  < HTTP/1.1 200 OK
  < X-Powered-By: Express
  [...]
  {"code":3,"message":"no such function","data":null}

After:
   curl --verbose "http://localhost:9001/api/1/notExisting?apikey=ABCDEF"

   < HTTP/1.1 404 OK
   < X-Powered-By: Express
   [...]
   {"code":3,"message":"no such function","data":null}

Fixes #3546.
2020-03-15 09:26:44 +00:00
..
db db/SecurityManager.js: accessing without session a public group pad no longer causes a crash 2019-12-26 00:30:43 +01:00
eejs use latest ejs 2015-04-11 09:53:27 +01:00
handler APIHandler: return HTTP/404 when non existing API methods are invoked 2020-03-15 09:26:44 +00:00
hooks security: when served over https, set the "secure" flag for "express_sid" and "language" cookie 2019-12-07 04:36:01 +01:00
utils fix 2020-03-14 21:58:26 +01:00
easysync_tests.js Revert "51c14d994756e60333b0b60eccb7255cf0c86461 changed the return value of" 2015-02-16 06:22:49 +01:00
padaccess.js access controls: promisification 2019-01-23 16:29:36 +00:00
README.md minor typo fix 2019-08-08 21:58:30 +02:00
server.js runtime: deprecate node 8.x. Require node >= 10.13.0 starting from Etherpad 1.8.3 2019-10-20 00:02:00 +02:00
stats.js node8: we no longer need to use a shim for Object.values in stats.js 2019-02-19 22:01:12 +01:00

About the folder structure

  • db - all modules that are accessing the data structure and are communicating directly to the database
  • handler - all modules that respond directly to requests/messages of the browser
  • utils - helper modules

Module name conventions

Module file names start with a capital letter and uses camelCase

Where does it start?

server.js is started directly