Skip to content

Running LATE

Frank Matranga edited this page Sep 25, 2019 · 9 revisions

tl;dr

  1. Open two terminals in VSCode
  2. Run npm run frontend in one and npm run backend in the other
  3. Wait till done
  4. Go to http://localhost:8080 in your browser

a. Start Servers

Open two separate terminals in VSCode and run the frontend hot-reloading server and API server, one in each:

  • $ npm run frontend
  • $ npm run backend

An example of your terminal after running both commands

The backend should go up in a few seconds and tell you what url and port to access it on. It should be something like localhost:3000. Do not use this url.

The frontend will take a lot longer as it is compiling all of the Vue components and linting them. Once it finishes the terminal will be green and will provide the url (usually localhost:8080) to visit the website. THIS IS THE URL YOU USE! Navigate to the given url in Chrome/Firefox.

An example of the output once compilation is complete

In development mode, LATE will allow you to login as any user by providing the RPI username (RCS ID) of the student. You can use your own, make one up, or use Frank's matraf since there is already a lot of data in my test account. If you leave it blank, you can view the site as if you were not logged in.

Development mode data is totally separate from the production server's data. So mess with it as you please!

b. Make Changes

If you make a change to a Vue component or any frontend file while the frontend server (:8080) is running, it will automatically recompile and update the page in your browser either silently or refresh the page (if you change any complex stuff). A lot handier than waiting for npm run build all the time!

If you make a change on the backend server, it will automatically restart. You should then refresh the page to reconnect to the server.