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 trialZack Jackson
30,220 PointsAlternative live-server setup
Here's an alternative setup for a Node.js dev server that I used:
Verify that Node.js is installed. If you see anything when you run which npm in a terminal, it is. If not, follow the instructions at nodejs.org to install.
Install live-server: npm install -g live-server
Move your terminal to where your pages live: cd <path-to-content>
Start the server: live-server .
Open localhost:8080 in a browser.
If you want to set live-server up as an npm script, you can navigate to your project directory, run npm init, and then setup server under scripts. Make sure to install it as a dev dependency with --save-dev if you go this route (see below).
"scripts": { "serve": "live-server" }, "devDependencies": { "live-server": "^1.2.0" }
Unsubscribed User
Full Stack JavaScript Techdegree Graduate 27,351 PointsYou're a bonefide hero, Zack Jackson!
Brian Kidd
UX Design Techdegree Graduate 36,466 PointsZack Johnson, this makes way more sense than using the Python server. Thanks for your insight! BK
William Rankin
2,028 PointsLegend, thanks mate
5 Answers
Caleb Spindler
11,397 PointsIf anyone is using ATOM, check out the atom-live-server package for a super easy way to locally host your project.
Rochelle Burrows
8,528 PointsThank you!
Bar Horing
Courses Plus Student 3,794 PointsThanks for this usefull post. a few popular alternatives:
- I've used http-server: https://www.npmjs.com/package/http-server
- serve: https://www.npmjs.com/package/serve
candicemarquart
7,902 PointsThanks! This is way better.
Ian Ostrom
Full Stack JavaScript Techdegree Student 10,331 PointsFor VS Code users, try the Live Server extension. One click to set up a local server.
James Almeida
8,881 PointsJames Almeida
8,881 PointsThanks for this. Super useful!