Andreas Ó hAodha 8d9181f5ca remove irrelevant npm packages from readme
remove npm packages from the Preqreuisites section of the readme because they should get automatically installed in step 1 of the setup
2023-07-10 15:01:48 +01:00
2023-03-27 14:25:26 +01:00
2023-07-09 00:14:23 +01:00
2022-11-24 13:43:26 +00:00
2023-03-02 12:47:36 +00:00
2023-03-20 16:15:01 +00:00
2023-01-30 16:58:48 +00:00

Irish Rail Tracker

Setup

Local Emulation

Prerequisites

  • Java 11 or greater
  • npm

Setup

  1. Run npm install in the root directory of the project (traintracker/). Note that this may require root privileges on certain operating systems (i.e., to be ran with sudo).
  2. Run npm install in the traintracker/functions/ directory.
  3. Start the Firebase emulator, which is needed to emulate the Firebase functions locally. Note that the Firebase emulator will occupy the focus of your terminal while it is running, so you will either need to keep it in its own dedicated terminal window or fork it into the background by appending & to the following command:
firebase emulators:start
  1. Wait until the until the emulator says that it is ready before starting the web app using the following command:
npm run dev
  1. A localhost or 127.0.0 link will appear in your terminal, navigatee to this link in a web browser to view & interact with the web app.

Shutdown

  1. To kill the npm process (the webapp itself) you can simply send an interrupt signal by hitting CTRL + C in terminal in which it is running.
  2. To kill the Firebase emulator process, you can again just simply send an interrupt signal by hitting CTRL + C in the terminal in which it is running in the foreground. Note that if you have forked the process to the background in a terminal, you will have to run the command fg to bring it to the foreground before hitting CTRL + C to kill the process.

Testing

Vue.js Unit Tests

There are a series of Vue.js unit tests which are automatically ran with Github Actions when a pull request is made or when a branch is merged into main. Optionally, they can be ran locally via the following command:

npm run test:unit

Firebase Integration Tests

There are also a series of Firebase integration tests which are automatically ran with Github Actions when a pull request is made or when a branch is merged into main. Optionally, they can be ran locally via the following command in the traintacker/functions/ directory:

cd functions && npm run test

Manual Firebase Deployment

The webapp is automatically deployed to Firebase via Github Actions automatically when a branch is merged into main, provided that it successfully passed the Vue.js unit & Firebase integration tests. It can also be manually deployed with the following command ran in the traintracker/ directory, but this is not to be done without explicit approval of each of the project owners. You will need the appropriate Firebase authentication tokens to do this.

npm run build && firebase deploy

Deployed Site: irishrailtracker.web.app

Jira: trainenthusiasts.atlassian.net

GitHub: github.com/0hAodha/traintracker

Description
CT216 Project - Irish Rail Train Tracker
Readme 12 MiB
Languages
Vue 71.5%
JavaScript 28.2%
HTML 0.3%