microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.31k stars 2.77k forks source link

ejs support #112

Closed jimfilippou closed 6 years ago

jimfilippou commented 6 years ago

How to convert everything from pug to ejs?

mattwelke commented 6 years ago

You would look for a different view engine NPM package that would interpret the EJS views:

https://www.npmjs.com/package/ejs

In the Express code you'd wire up the EJS view engine instead of Pug. Change:

app.set("view engine", "pug");

to:

app.set("view engine", "ejs");
jimfilippou commented 6 years ago

Yes but every file is ".pug", is there any way to convert pug to ejs?

mattwelke commented 6 years ago

You could look into converters or do this yourself. That's outside of the scope of this repo.

bowdenk7 commented 6 years ago

Thanks @welkie!