Running Sites Locally

From CSE256A Wiki
Revision as of 18:49, 20 January 2021 by Caitlin.Kelleher (talk | contribs)
Jump to navigation Jump to search

There are some custom scripts developed that provide an easy way to to test your submissions locally as you work on your assignments.

  1. Open a terminal window or the terminal in your code editor (I recommend doing this directly in VSCode).
  2. Navigate to your repository folder. This will vary by project. Information foraging should be something like: information-foraging-<YOUR_GITHUB_ID>.
  3. Make sure that all the necessary dependencies have been installed for your project. You can do this by running:
npm install
  1. NOTE: You only need to install dependencies once for each project.
  2. Next, start a local webserver from your project directory by running:
npm run dev
  1. It may take a few seconds, but this should automatically open your website in your browser. Feel free to make changes to any of your code and the webserver will watch for updates that you make. If it notices new updates it will recompile your application and push the new copy to your web browser automatically.
  2. When you are done using your webserver, you can turn it off by clicking on your terminal and then 'CTRL+C'.