10 Commits

Author SHA1 Message Date
rijkvanzanten
9b210ed597 Move startServer to server.ts 2021-09-13 17:48:36 -04:00
Nicola Krumschmidt
3e7d00982f Replace require.main check with start script (#8005) 2021-09-13 16:31:21 -04:00
Zeb Pykosz
aaeb2d6750 log localhost url so it's clickable in terminals (#7604)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-08-25 15:13:52 +00:00
Saad Irfan ⚡️
afdeb980cb Support for notifying user if an update is available for Directus CLI (#6852)
* Notify user if an update is available

* Replaced console log with logger

* Fix lint error

* Update api/src/start.ts

* Make update check non-blocking

* Remove unused async call

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-07-26 19:36:16 -04:00
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
rijkvanzanten
142b250c8d Use pino error instead of fatal
Fatal throws flushing error when using 'pretty' log style
2021-02-23 11:29:37 -05:00
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
b02c2d85d5 Add more descriptive error on startup on empty DB 2020-11-04 17:28:29 -05:00
rijkvanzanten
83971d9bc6 Make app / server creation async
Fixes #690
2020-10-19 16:38:15 -04:00
rijkvanzanten
0b894138b7 Move start to separate file 2020-10-15 12:44:21 -04:00