2 ms·
If you _just_ want a Hello World then using a system designed for extensibility, etc. is probably not a good idea. But Angular 2 is not designed to be scaled d
by AndrewDucker 10y ago
If you _just_ want a Hello World then using a system designed for extensibility, etc. is probably not a good idea.
But Angular 2 is not designed to be scaled down that far, and making it friendly for that use would probably mean that other things became more complex.
- piaste 10y agoA pretty straightforward solution is to have all your extensible options, etc., but also provide a few static objects with all options set to a working default. Use those objects for the hello world, or change the options you need to change and ONLY those options - no boilerplate. Suave.io [0] does this very well I think. The hello world is: open Suave startWebServer defaultConfig (Successful.OK "Hello World!") and as you write your application you can edit the configuration and routes as you go: open Suave let myConfig = { defaultConfig with logger = myCustomLogger homeFolder = HOME_PATH } let myRoutes = choose [ path "/helloWorld" (Successful.OK "Hello World!") pathScan "/hello/%s" (Successful.OK << CreateCustomGreeting) ] startWebServer myConfig myRoutes [0] http://www.suave.io http://www.suave.io