/landfill-web-app

Landfill e-Forms Web Application

Primary LanguageJava

Landfill e-Forms Web Application

The Landfill e-Forms Web Application is developed with an Angular 4 front-end and a Java/Spring back-end, and is very much still a work in progress.

Table of Contents

Prerequisites

This section lists the prerequisites for each component of the web application separately. You will only need the prereqs for the component(s) that you want to work on or run.

Front-End Server

  • Node 6.9 or higher together with npm 3 or higher is required. Download both Node and npm from here. For Linux users, Node can be installed via package manager, and npm can be similarly installed.
  • Angular-CLI (installation instructions below).
  • Visual Studio Code, or another TypeScript editor. Download VS Code from here.

Back-End Server

  • Java 8 (JDK or OpenJDK recommended).
  • Eclipse, or another Java IDE.
  • Gradle Buildship plugin for Eclipse, or the equivalent if using a different IDE. Installation instructions can be found here.

Database Management

  • Microsoft SQL Server Management Studio. Download from here.
  • Alternatively, DBeaver can be used. However, there appears to be some limitations with modifiying existing table columns.

Environment Setup

This section will help you set up the development environments for the first time. Each component will require its respective prerequisites to be installed.

Front-End Server

The following instructions assumes that you will be using Visual Studio Code as the TypeScript editor.

Selecting the Project Folder

  1. Start Visual Studio Code.
  2. Go to File->Open Folder... and select the landfill-web-app/client folder.

After this step, you should see the contents of the landfill-web-app/client folder in the Explorer pane.

Installing Angular-CLI

If your machine does not have Angular-CLI installed, you will need to install it. You can skip this step if Angular-CLI is already installed.

  1. Open the Visual Studio Code built in console by pressing CTRL+~.
  2. Run the command npm install -g @angular/cli to install Angular-CLI.

Angular-CLI may take a few miniutes to download.

Installing npm Dependencies

  1. Open the Visual Studio Code built in console by pressing CTRL+~, if its not already opened.
  2. Make sure that the current working directory is the landfill-web-app/client folder.
  3. Run the command npm install to install the project dependencies.

The dependencies may take a few miniutes to download.

Back-End Server

  1. Start Eclipse.
  2. Import landfill-web-app/server as Gradle Project.
  3. If Gradle has not automatically downloaded the project dependencies, right click on the 'server' project folder and click Gradle->Refresh Gradle Project.
  4. Add the Microsoft SQL Server JDBC driver sqljdbc42.jar from the server/lib directory to the project's build path.

Database Management

Coming soon...

Launching Server Instances

This sections describes the process of launching a local instance of a development server.

Front-End Server

To launch the front-end server from within Visual Studio Code:

  1. Open the Visual Studio Code built in console by pressing CTRL+~.
  2. Make sure that the current working directory is the landfill-web-app/client folder.
  3. Run the command ng serve to start the front-end server.

Note front-end server is set to listen on port 4200, so make sure that no other processes are listening on the same port number. The home page can then be accessed at http://localhost:4200/.

Back-End Server

To ensure that the proper 'dev' profile is loaded when running an instance of the back-end server on your machine, add the paramter --spring.profiles.active=dev to the run configuration in Eclipse.

Note that the back-end server is set to listen on port 8080 for when running in development mode, so make sure that no other processes are listening on the same port number.