This can be implemented using the server.handler method.
This can then be specified inside the plugin instead of being part of the JSON, meaning we impose certain routes (which is fine; the user has required abase because they want a user system, right?), and the user has less JSON to worry about.
(h/t @des-des)
Might be nice to specify the standard routes (e.g
login
,signup
, etc) with a handler object instead of in the JSON configuration file.Fora usage example:
This can be implemented using the
server.handler
method.This can then be specified inside the plugin instead of being part of the JSON, meaning we impose certain routes (which is fine; the user has required abase because they want a user system, right?), and the user has less JSON to worry about.