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 AngularJS Basics (1.x) Getting Started with Angular Setting Up Your First Angular App

Bruno Dias
Bruno Dias
10,554 Points

Run this app locally

How can I run this app locally? I am trying to follow along using my own workspace. Do I need to use npm?

3 Answers

Bruno Dias
Bruno Dias
10,554 Points

For those who want to follow using their own workspace, I installed npm http-server. It working fine with no errors.

Link: https://www.npmjs.com/package/http-server

Bruno Dias
Bruno Dias
10,554 Points

You should use http-server -o

Ryan Foster
Ryan Foster
7,297 Points

That worked thank you!

Ryan Foster
Ryan Foster
7,297 Points

I'm running the command "http-server scripts/app.js" the server starts up and provides me with a port number. Whenever I try to connect to it in the browser I receive a download file. This occurs on both chrome and mozilla. Do i need to do some sort of setting configuration?

Try to run 'http-server .' with dot inside your application directory/folder. App.js is not the starting file, user should visit .html file, in our case index.html. This means you can run 'http-server . ' or 'http-server index.html'