en_btr_frontend/README.md

2.9 KiB

gwt-frontend

This README outlines the details of collaborating on this Ember application. A short introduction of this app could easily go here.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone <repository-url> this repository
  • cd gwt-frontend
  • npm install

Running / Development

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

  • ember test
  • ember test --server

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Building

  • ember build (development)
  • ember build --environment production (production)

Deploying

The project uses ember-cli-deploy-simply-ssh to handle automated deployments to the production server. In order to deploy a build, you need to have SSH access to the host server and an ssh key setup for authentication. Instructions for setting up an ssh key on your local machine can be found at https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent (only follow the instructions for 'Generating a new SSH key'. To get your public key installed on the server you will need to contact the hosting administrator.

Once your key is setup and installed on the host server, you will need to add a file named .env.example.production with the following contents:

SSH_HOST=server_host_name
SSH_PORT=server_port
SSH_USER=server_user
SSH_KEY=/Users/yourname/.ssh/your_private_key

Change the variables to your required settings, but do not commit the file to the repo. ember-cli-deploy-simply-ssh is able to handle SSH password authentication as well, but you will need to investigate that on your own.

Once your configuration is set, run

ember deploy production --activate

This command will create a new revision on the server and activate it. If you run without the --activate option you will need to activate the revision manually by running

ember deploy:activate production --revision revision_number

revision_number will look something like 53b49825426ef9fa12a24254afa45e55.