Running a Local Server

Why Do you need to run a local server?

  • There are many instances where developers will want their local environment (i.e. developing on your laptop or desktop) to closely resemble a production environment (e.g. your application hosted in the cloud)

  • This allows test your application in a more realistic setting.

  • There are some instances where running a local server is required. Examples of this scenario includes working with 3rd party APIs such as Mapbox or Twitter.

How do I know if my project is running on a Local Server?

An easy way to tell if your project is running on a local server is to view the address bar once your project is displayed in the browser.

  • If the url for your project starts with file:/// then your project is NOT running on a local server*

    inline

  • If the url for your project starts with http://localhost:<some number> then your project is running on a local server

inline

Running a Local Server

You’ll need to run a server on your computer in order for the application to run. Do the following to get a server running on your computer: