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

Aakash Srivastav
seal-mask
.a{fill-rule:evenodd;}techdegree
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 Points

local server

How can i test my local website on various devices by sending link. It really feel bad because I got nothing about this topic. So please help me. Chromedevtool is having bug in showing my website at in various devices. So , I decided to send the link of my website (developed by techdegree project) on my mobile , but its not opening. I think I need to convert my webpage from "file:///C:...." to "https..." . But how will I do it?

I am also learning so I don't have too much info at the moment, but I don't think you can do that. The only way to do it is to adjust the size of your screen. At least this is what I have been taught so far. If you just look up for different screen sizes and then you just make your internet window the same size, that should be the same as try it on a phone. If anyone has a better answer I would be interested to know it as well :)

Aakash Srivastav
seal-mask
.a{fill-rule:evenodd;}techdegree
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 Points

Thanks Raluca. I search a little bit and I found "000webhost.com". It's really awesome. It provides you fee web hosting . I am using it now. Simply upload your files....there and it crates a https link for you..infact you can edit the code there. Happy Coding ?

1 Answer

Chrome dev tools is a good option, but if you truly want to see it on your actual mobile device you can look into 'localtunnel' or 'ngrok' . The easiest and quickest way is to quickly start up a node http server on localhost and then point ngrok or localtunnel to your localhost port. You will then get a unique url which you can use on your mobile device and other devices.

If you are not familiar with node. No worries. You can just do npm install express-generator -g in the command line. Then create a new directory. cd into the directory and type express myapp . This will quickly scaffold a node express server for you. All you need to do is put your html/javascript/css files into the new public folder. Then run npm start to start the server. In a new terminal window now point localtunnel or ngrok to the correct port.