nanoexpress / legacy

[Deprecated] Nano-framework for Node.js. Use PRO version
https://nanoexpress.js.org
Apache License 2.0
107 stars 13 forks source link

Is handlebars supported in nanoexpress like expressjs? #74

Closed victor-yang-bot closed 4 years ago

victor-yang-bot commented 4 years ago

Hi, im trying to run handlebars(view engine) with nanoexpress, any recommendation?

dalisoft commented 4 years ago

Hi @victor-a-rigacci Thanks for interesting to nanoexpress!

This project doesn't built to be used with handlersbars at beginning, because there none of user was mentioned this within alpha phase.

There has 3 options:

  1. Create your own middleware (i don't how do you this, but anyway there has way)
  2. See how looks like this manually adding
    
    const contentOfTemplate: string = getSomehowYourHandlerbarFile();

app.get('/hi', (req: HttpRequest, res: HttpResponse): HttpResponse => res.end(contentOfTemplate({yourPropsHere})));


3. *This variant only if you don't have time to try out 2 options above*

Back to `express` or any of `Handlers` supported backend server framework (`Fastify`?)
dalisoft commented 4 years ago

@victor-a-rigacci Is your question was answered? If yes, please close issue. Thanks

dalisoft commented 4 years ago

No answer. I sure i already answered here

dalisoft commented 4 years ago

@victor-a-rigacci As an option, you can become Sponsor with level Pro patron or higher and can ask feature you want