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

Development Tools

Sarah Baldwin
PLUS
Sarah Baldwin
Courses Plus Student 444 Points

Git question: How to checkout and trouble shoot from master once live - can you still load the server without localhost?

I have a website where I have the master branch set up without localhost:8080 because that is what I need on the live version. I usually develop off of my dev branch and push completed changes to dev. Dev launches via localhost:8080 to work with my code.

I just did github basics by Tommy and he said for small bugs you can branch off of master and just do a quick fix, but I'm not sure how to run my master code locally because the server code is doesn't use localhost:8080.

Is there a way to do this? Or is there a way to improve my workflow/do all of this better?

Thanks for any help.

1 Answer

Ari Misha
Ari Misha
19,323 Points

Hiya there! You can always run your dev-server on the port of your choice, you don't have to rely on the default port that comes with the modules. Now there are a couple of ways to change the port on dev-server: Either change the port in the file directly or you can always give it a flag called --port while launching the server in the terminal. Now port flag takes an argument, and this argument would be the port of your choice. Now, as far git branch goes, if you're using an IDE like VS Code or WebStorm/IntelliJ or even Atom, they already come with a version control distribution engine where you can manage everything from logs to statuses to branches. I'd highly recommend you to research about built-in Version control engine in your fave IDE. Even if you're using a simple text editor like Sublime Text, you can still launch a different terminal or git bash just to manage everything regarding your versioning in your workflow. I hope it helped!

~ Ari