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
Austin Miller1,047 Points
How do you create a local server?
The video says to download the files and then create a local server. It says that one way to do that is to use a plugin in Visual Studio. I don't use Visual Studio, and the video doesn't mention any other ways to set up a local server. How do I do that?
This should really be part of the video, or at least mentioned in the teacher's notes.
Laura CoronelTreehouse Teacher
Hey Austin Miller You are totally right! I just added a teacher's note on another way of launching a local server but I'll also type it up here.
If you don't use Visual Studio Code, one way of launching a local server is by using the http-server package. To use it first open your terminal and navigate to the
scoreboard project files. Run
npx http-server . -o -c-1 The
-o should automatically launch your project in the browser. If not the terminal will tell you the url to navigate to in your browser to see the project. Might look something like this:
laura scoreboard %npx http-server . -o -c-1
Starting up http-server, serving .
http-server version: 14.1.1
Cache: -1 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Hit CTRL-C to stop the server
Let me know if this works or if you're having any issues with it!