Commit Graph

20 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
WoLfulus
7f3e095a1f Enable base and admin routes when developing a Directus app 2020-12-17 11:42:50 -03:00
Igor Savin
7cddb458cb Run prettier across app and api 2020-12-08 02:22:00 +02:00
rijkvanzanten
83971d9bc6 Make app / server creation async
Fixes #690
2020-10-19 16:38:15 -04:00
rijkvanzanten
a0d909f7d9 Cleanup server file a bit 2020-10-19 16:21:38 -04:00
WoLfulus
4662ede22f Adds separate path and host 2020-10-17 13:43:21 -03:00
WoLfulus
13285ff522 Added response events to the server 2020-10-17 13:26:24 -03:00
rijkvanzanten
0b894138b7 Move start to separate file 2020-10-15 12:44:21 -04:00
rijkvanzanten
0e0d5e8213 Start server when running file directly with Node 2020-10-15 12:34:57 -04:00
rijkvanzanten
a39b762c81 Move start functionality to server.ts 2020-10-15 12:31:57 -04:00
rijkvanzanten
a4092a070d Add server.start / server.start.before / server.stop / server.stop.before 2020-10-15 12:19:14 -04:00
rijkvanzanten
cc950b5510 Move main server logic out of cli 2020-10-15 12:15:37 -04:00
rijkvanzanten
23458b5b9f Last port change, promise 2020-10-02 16:26:40 -04:00
rijkvanzanten
1524c3e398 Change default port to 8805 2020-10-02 14:56:39 -04:00
rijkvanzanten
a67b338f09 Don't validate env in server 2020-09-08 14:57:21 -04:00
rijkvanzanten
bc4b493ff9 Do checks before starting server 2020-08-04 13:21:51 -04:00
rijkvanzanten
2252d5a35f Use centralized env export with validator function 2020-08-04 13:10:49 -04:00
rijkvanzanten
a0306b1b8a Force api to dev port on development mode 2020-08-03 18:10:37 -04:00
rijkvanzanten
a99a7f47f4 Use port 41201 instead of 3000 by default 2020-08-03 17:44:09 -04:00
rijkvanzanten
bde7069cce Move api into api subdirectory 2020-07-29 11:22:56 -04:00