Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

node.js express app creation equivalent in Windows 7

node.js express app creation equivalent in Windows 7

Problem

I'm following this tutorial on node.js and express.

The author is on a UNIX machine. To create the app skeleton with express, jade, and stylus, the author says to run the command

./node_modules/express/bin/express -t jade -c stylus

However, I'm on a Windows 7 machine, so this command doesn't work. ./node_modules/express/bin/express jade stylus doesn't do what is desired either.

What is the equivalent of the author's command for Windows PowerShell?

Problem courtesy of: Scott David Tesler

Solution

Express can be installed "globally". That means that the OS will create a link to express in the command line that will run the express application creator.

Just add a -g option while installing and then call express directly without the path to node_modules:

C:\project>npm install express -g
C:\project>express --sessions --css stylus --ejs myapp

I recommend you to follow the official guide: http://expressjs.com/guide.html. The tutorial you're following is for Express 2.* and Express 3 changed a bit.

Solution courtesy of: juandopazo

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

node.js express app creation equivalent in Windows 7

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×