This is the repository for the frontend code of the IE Bank web app
This source code works under the following technologies:
- Install Node.js. Install Node.js from here. Make sure to select the option to add Node to your PATH while installing.
- Install VSCode. Install VSCode from here.
- Install Vetur VSCode extension. Install the Vetur VSCode extension from here.
Learn more: Using Vue in Visual Studio Code
- Install node dependencies. Open a terminal and run the following command on the root folder of this project:
$ npm installThis will create a node_modules folder with all the dependencies needed to run the application configured in the package.json file.
Learn more: Vue.js debugging in Chrome and VS Code
- Configure the
launch.jsonfile. Click on the Debugging icon in the Activity Bar to bring up the Debug view. Then click on the gear icon to configure alaunch.jsonfile, selecting Chrome for the environment:
- Configure the
launch.jsonfile. Replace content of the generatedlaunch.jsonwith the following configurations:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "IE Bank Frontend",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"breakOnLoad": true,
"pathMapping": {
"/_karma_webpack_": "${workspaceFolder}"
},
"sourceMapPathOverrides": {
"webpack:/*": "${webRoot}/*",
"/./*": "${webRoot}/*",
"/src/*": "${webRoot}/*",
"/*": "*",
"/./~/*": "${webRoot}/node_modules/*"
},
"preLaunchTask": "vuejs: start"
}
]
}- Add the following
npmtasks to youtasks.jsonfile:
{
"version": "2.0.0",
"tasks": [
{
"label": "vuejs: start",
"type": "npm",
"script": "serve",
"isBackground": true,
"problemMatcher": [
{
"base": "$tsc-watch",
"background": {
"activeOnStart": true,
"beginsPattern": "Starting development server",
"endsPattern": "Compiled successfully"
}
}
]
}
]
}- Start debugging. Set a breakpoint anywhere in the
src\components\AppAccounts.vuefile. Go to the Debug view, select the 'IE Bank Frontend' configuration, then press F5 or click the green play button. Your breakpoint should now be hit as the new instance of Chrome opens
Learn more: Modes and Environment Variables
Mode is an important concept in Vue CLI projects. By default, there are three modes:
developmentis used byvue-cli-service servetestis used byvue-cli-service test:unitproductionis used byvue-cli-service buildandvue-cli-service test:e2e
When running vue-cli-service, environment variables are loaded from all corresponding files. If they don't contain a NODE_ENV variable, it will be set accordingly (NODE_ENV will be set to "production" in production mode, "test" in test mode, and defaults to "development" otherwise).
You can specify env variables by placing the following files in your project root:
.env # loaded in all cases
.env.local # loaded in all cases, ignored by git
.env.[mode] # only loaded in specified mode
.env.[mode].local # only loaded in specified mode, ignored by gitIt is possible to define the mode to use at build time by using the --mode option. For example, to build for uat mode:
vue-cli-service build --mode uatbuilds a production app in uat mode, using.env,.env.uatand.env.uat.localif they are present
The environment variables are specified in this project root:
Only NODE_ENV, BASE_URL, and variables that start with VUE_APP_ will be statically embedded into the client bundle, so do not use variables with other naming convention.
Learn more:
The file .github/workflows/ie-bank-frontend.yml contains the configuration for the CI/CD pipeline.
The workflow uses the following GitHub secrets:
| Secret name | Description | Learn more |
|---|---|---|
AZURE_CREDENTIALS |
Azure credentials to authenticate to Azure via Service Principal | Use the Azure login action with a service principal secret |

