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 Setting up Webpack Dev Server

Andrew Folts
Andrew Folts
14,238 Points

Possible to use "localhost/example.com" instead of "localhost:8080"?

I'm trying to build a project management app that uses React and Wordpress.

The React app works fine on localhost:8080, but I need it to actually run with the Wordpress site at "localhost/example.com" because I need to be able to create posts, etc.

The React files are located inside my Example Theme directory.

1 Answer

Steven Parker
Steven Parker
231,269 Points

A port can be part of a path, such as: "localhost:8080/example.com". But it would be most unusual to have a web resource that ends in ".com".

Andrew Folts
Andrew Folts
14,238 Points

My local Wordpress install runs at localhost/example.com, so I want Webpack to run the build in the same place. I guess I'm just confused about what needs to happen.