Commit Graph

56 Commits

Author SHA1 Message Date
WoLfulus
b8e7c80b72 Application initialization events (#3680)
* Adds `not_found` hook

* Separate hooks and endpoints initialization process

* Adds additional application events

* Remove unused import

* Change the event order to accound for notFound and errorHandler

* Change emitAsync.catch to use the emitAsyncSafe function

* Updated docs, reordered table by lifecycle and usage
2021-02-08 12:30:09 -05:00
rijkvanzanten
673edbe05c Fix dev check 2020-12-21 16:37:19 -05:00
WoLfulus
7f3e095a1f Enable base and admin routes when developing a Directus app 2020-12-17 11:42:50 -03:00
rijkvanzanten
0c72ee6b1d Fix deep filters in app, fix current-user/current-role in filters 2020-11-12 14:12:05 -05:00
rijkvanzanten
53a048ea67 Tweak order of middleware 2020-11-10 15:54:13 -05:00
rijkvanzanten
d49496395f Remove unused import 2020-11-09 17:25:16 -05:00
rijkvanzanten
8cbdfb409b Use prefetched schema info 2020-11-09 17:13:48 -05:00
rijkvanzanten
0697f4b4be Add new overview method, attach it every request 2020-11-09 15:19:23 -05:00
rijkvanzanten
b02c2d85d5 Add more descriptive error on startup on empty DB 2020-11-04 17:28:29 -05:00
maartenvn
54161c0c72 Make PUBLIC_URL end-slash insensitive 2020-10-31 11:23:28 +01:00
maartenvn
6d38ddab76 Redirect to admin URL using relative URL 2020-10-31 11:22:32 +01:00
rijkvanzanten
9a38fdea5e Fix redirect from / in api 2020-10-30 19:04:31 -04:00
rijkvanzanten
91cf8bdfc8 Fix redirect to admin for subpaths 2020-10-30 18:33:41 -04:00
rijkvanzanten
708aea6fb6 Allow App to run under subpath 2020-10-30 18:11:55 -04:00
rijkvanzanten
83971d9bc6 Make app / server creation async
Fixes #690
2020-10-19 16:38:15 -04:00
WoLfulus
a74e0b72a8 Remove response hook 2020-10-17 13:26:00 -03:00
rijkvanzanten
2a9987084a Use terminus 2020-10-15 11:40:12 -04:00
rijkvanzanten
0dd8b9075c Remove unused imports 2020-10-15 11:15:56 -04:00
rijkvanzanten
8a9c0af3a7 Move destroying logic to start cli handler, rename event 2020-10-15 11:15:06 -04:00
rijkvanzanten
00400636a2 Merge branch 'main' into feat/route-hooks 2020-10-15 10:42:27 -04:00
rijkvanzanten
292f2206ed Add ip allow list check 2020-10-13 15:50:23 -04:00
WoLfulus
d999956234 Revert initial changes and add discussion points 2020-10-09 16:03:47 -03:00
WoLfulus
e826a99d09 Add init event with app access 2020-10-09 15:04:45 -03:00
rijkvanzanten
d6e5a45be3 Add response hook 2020-10-06 16:21:36 -04:00
rijkvanzanten
eeedc01c53 Add /utils/revert, use in app
Fixes #485
2020-10-02 16:20:06 -04:00
rijkvanzanten
551cb19e9a Dynamically generate graphql schema, resolve using services 2020-10-02 10:34:47 -04:00
rijkvanzanten
85ca7b5d17 Run prettier 2020-09-22 16:11:28 -04:00
rijkvanzanten
7caf429d1d Add custom endpoints support 2020-09-22 15:55:22 -04:00
rijkvanzanten
48fca55651 Restructure exports for services 2020-09-22 13:16:14 -04:00
rijkvanzanten
e3b731cf7a Handle wrong JSON in post/patch payload
Fixes #80
2020-09-21 16:44:53 -04:00
rijkvanzanten
d9bfd6148f Fix router not reaching 404 handler
Fixes #352
2020-09-21 13:32:03 -04:00
rijkvanzanten
7b2e890925 Add telemetry 2020-09-17 11:52:06 -04:00
rijkvanzanten
a3494384c7 Set token expiration in ms 2020-09-10 16:53:26 -04:00
rijkvanzanten
9546dbb834 Dynamically register / fire webhooks 2020-09-10 14:00:28 -04:00
rijkvanzanten
b19ffd960b Add response middleware and cache 2020-09-08 18:28:23 -04:00
rijkvanzanten
43465a803a Re-add rate limiter 2020-09-08 17:09:04 -04:00
rijkvanzanten
9643b86dc5 Merge branch 'main' into feature-redis-cache 2020-09-08 16:57:15 -04:00
rijkvanzanten
9f3e12f8f2 Run prettier 2020-09-08 16:03:38 -04:00
rijkvanzanten
08eb25fc89 Cleanup app file 2020-09-08 15:53:20 -04:00
kukulaka
9d6f80149c changes for caching
Most changes should be here, just making sure flush cache is in for each post / delete
2020-08-31 17:16:45 +01:00
Tanya Byrne
c8f771c807 Only use rate limiter if rate_limit enabled set to true 2020-08-25 20:21:06 +01:00
Tanya Byrne
226280d6ba update caching 2020-08-25 13:49:08 +01:00
Tanya Byrne
efcb711d92 changing the cache again 2020-08-25 13:23:54 +01:00
Tanya Byrne
2a1df69818 #78 rate limiter - all routes 2020-08-17 12:56:21 +01:00
rijkvanzanten
c2b6b2a090 Rename routes to controllers 2020-08-15 16:56:45 -06:00
rijkvanzanten
8ea9bb3567 Connect logger to express logger 2020-08-12 15:14:02 -04:00
rijkvanzanten
1edc132651 Host modules to top on bootstrap 2020-08-06 14:53:30 -04:00
rijkvanzanten
ad4e3e4fb5 Fix admin app not returned from api 2020-08-04 13:42:06 -04:00
rijkvanzanten
bc4b493ff9 Do checks before starting server 2020-08-04 13:21:51 -04:00
rijkvanzanten
cf5a49a9f5 Add validateDBConnection function 2020-08-04 13:16:14 -04:00