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 Gulp Basics Welcome to Gulp.js Installing Gulp

Gary Calhoun
Gary Calhoun
10,317 Points

not getting anything on local node server

I am using windows command prompt was following along fine until the running the node server. I have nodemon installed so I usually just do "nodemon package.json localhost 8080" I am not sure I am getting nothing from that. If anyone was able to get it to work on windows please let me know.

3 Answers

So you have a few options here. If you specified a "main" field within your package.json file, then nodemon can be entered as is to start the server. Another option is to include the name of the file which holds the server information (usually app.js). Example

. . .
// other code
. . .
app.listen(3000, callback)

Lets say the example above is named app.js. Running 'nodemon app.js', will run the server on port 3000. Hope this helps.

Gary Calhoun
Gary Calhoun
10,317 Points

Hi thanks for the answer. I was able to get the server running before in previous treehouse lessons but doing this course in particular on gulp.js I have been unsuccessful here is the repository

https://github.com/hdngr/treehouse-gulp-basics

So which do I run because the app.js is in a folder, do I need to change directory in command prompt to the js directory and then do the nodemon app.js?

Samuel Tissot-Jobin
Samuel Tissot-Jobin
7,350 Points

the answer in on the github page:

https://github.com/hdngr/treehouse-gulp-basics

This course requires you to have global installations of gulp and http-server.

Install gulp globally

npm install -g gulp

Install http-server globally

npm install -g http-server

Gary Calhoun
Gary Calhoun
10,317 Points

I got it working I installed grunt installed the http server than I ran

http-server E:\xampp\htdocs\gulp\treehouse-gulp-basics

worked without issues, I don't know this server stuff is a little confusing to me, going to have to research this node.js more I watched a course on it and understand what its doing but something isn't clicking for me.

Hey am glad you did figure it out. I was not to sure which way to answer this question as I myself have not done the course yet. I use Gulp in almost everything I use though so maybe I will take a look at it. Cheers