Closed BrunnerLivio closed 5 years ago
I understand that you probably want to render the index.html so it looks more appealing
Exactly.
Maybe the app service returns a static array of benefits of NestJS which then get rendered by the index.html?
In this case, we would have to add some template engine whereas I tried to keep this sample as simple as possible Any ideas what could we do instead? I agree that it definitely doesn't show nest benefits.
I tried to keep this sample as simple as possible
That does totally make sense. Unfortunately to me it seems like there is no other good way other than using a template rendering engine.. Maybe adding this to the example would not be too bad of an idea, because as a newcomer you can directly see that NestJS is using express as underlying HTTP client. Seeing that you can easily modify the express instance was also one of the points which made me jump onto NestJS back then :)
I updated the example. Would you mind to take a look? :)
Looking real good, clean, simple and usable.
One teeny tiny thing; seems like an uneeded import slipped in main.ts
: import { join } from 'path';
:)
Fixed!
The Codesandbox.io example on the start page is kinda questionable. The app.controller.ts does inject the
AppService
, but does not call anything from it, making it unneeded.I understand that you probably want to render the index.html so it looks more appealing. But maybe we should consider an example which actually uses a service, so the user better understands the benefits of NestJS? Maybe the app service returns a static array of benefits of NestJS which then get rendered by the index.html?