Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Express Basics (2015) Doing more with Express Using β€œexpress-generator” to Start an Express Project

Express-generator pug vs jade

Is there a new version of express-generator? After installing the express-generator npm I looked into the package.json file and noticed jade instead of pug was in the list of dependencies.

3 Answers

Jacob Wylie
Jacob Wylie
10,893 Points

I'm not sure if there is or not but what i did was change the jade dependency in package.json to: "pug": "^2.0.0-beta11",

and in app.js change the view engine to: app.set('view engine', 'pug');

and finally change the file extensions in the views folders from .jade to .pug.

Also, if you're using sublimetext you can add a package for formatting of .pug files: https://packagecontrol.io/packages/Pug

Check out the example using pug in the docs: https://expressjs.com/en/starter/generator.html

Tamas Sule
Tamas Sule
13,781 Points

pug = jade. They are the same just the name changed.