Here are three ways to setup local website previews, in 60 seconds! First, we’ll look at Prepros. Then we’ll use BrowserSync with Gulp. Lastly, we’ll look at XAMPP. Done.
Three Local Site Preview Methods
Install and run the prepros app for your operating system. Drag your static site project folder onto the interface. Right-click the project name and choose Open preview.
In your project folder run
npm init, then install BrowserSync and Gulp with
sudo npm install gulp browser-sync –save-dev. Make a gulpfile.js with the right code in it (download the source files for help on doing this). Run
For projects using PHP install XAMPP for your operating system. Put “yourprojectfolder” inside XAMPP’s “htdocs” folder, then run XAMPP and start the Apache and MySQL services.
In a browser go to localhost/yourprojectfolder. That’s it!
Learn more about running websites locally on Envato Tuts+.