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.
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.
- 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.
- 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.
- 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.
This section will help you set up the development environments for the first time. Each component will require its respective prerequisites to be installed.
The following instructions assumes that you will be using Visual Studio Code as the TypeScript editor.
- Start Visual Studio Code.
- 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.
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.
- Open the Visual Studio Code built in console by pressing
CTRL+~
. - Run the command
npm install -g @angular/cli
to install Angular-CLI.
Angular-CLI may take a few miniutes to download.
- Open the Visual Studio Code built in console by pressing
CTRL+~
, if its not already opened. - Make sure that the current working directory is the
landfill-web-app/client
folder. - Run the command
npm install
to install the project dependencies.
The dependencies may take a few miniutes to download.
- Start Eclipse.
- Import
landfill-web-app/server
as Gradle Project. - If Gradle has not automatically downloaded the project dependencies, right click on the 'server' project folder and click Gradle->Refresh Gradle Project.
- Add the Microsoft SQL Server JDBC driver
sqljdbc42.jar
from theserver/lib
directory to the project's build path.
Coming soon...
This sections describes the process of launching a local instance of a development server.
To launch the front-end server from within Visual Studio Code:
- Open the Visual Studio Code built in console by pressing
CTRL+~
. - Make sure that the current working directory is the
landfill-web-app/client
folder. - 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/.
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.