Code Along: Hosting with Surge

Code Along: Hosting with Surge

  • Together we’ll walk through the process of hosting a static website / application (that does not have a backend server like Express) using Surge

Instructions

1. Install the surge package on your computer

  • Run the following from your command line (from any folder location) to install surge globally on your computer

    $ npm install --global surge
    


2. Run surge from the Traffic Light project folder

  • On the command line, navigate to the project folder of the Traffic Light app (the one we used in the Github Pages code along)

  • Then, run the following command from within the project folder:

    $ surge
    
  • Press “enter” twice to confirm the project path and the surge domain url

    inline

3. Open surge-provided url in browser and confirm successful deploy

  • Open your browser and navigate to the surge-provided domain url assigned to your project

  • Confirm that a fully functional Traffic Light app is available at the surge-provided domain url