Skip to content

Edsdover/action-requests

Repository files navigation

Action Request

Action Requests app for reporting on live incidents and issues.

Requirements

Create a Firebase account and a Mailgun account.

Install the following.

brew install node yarn
yarn global add @angular/cli
yarn global add firebase-tools

Note: Node 8 is not yet supported by Firebase Functions.

Setup

From the app's root directory, install the app's Node package dependencies.

yarn install

Initialize Firebase and populate your Firebase project configuration.

echo "
  export const firebaseConfig = {
    apiKey: '',
    authDomain: '',
    databaseURL: '',
    projectId: '',
    storageBucket: '',
    messagingSenderId: ''
  };
" > ./src/environments/firebase.ts

Configure a Mailgun domain and API key with Firebase, as follows.

firebase functions:config:set mailgun.domain="<MAILGUN_DOMAIN>"
firebase functions:config:set mailgun.apikey="<MAILGUN_API_KEY>"

Finally, configure your notification preferences.

firebase functions:config:set notifications.default_to_address="[email protected]"
firebase functions:config:set notifications.cc_addresses="[email protected],[email protected]"
firebase functions:config:set notifications.bcc_addresses="[email protected]"
firebase functions:config:set notifications.phone_number="[email protected]"
firebase functions:config:set notifications.default_from_address="AR Bot <[email protected]>"
firebase functions:config:set notifications.hosted_url="https://action.example.com"
firebase functions:config:set notifications.email_prefix="AR"

Development server

Run ng serve from the app's root directory for a development server.

Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component <component-name> to generate a new component (shorthand: ng g c <component-name>). You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use --aot --prod --build-optimizer flags for production builds.

Deploying to Firebase

Run yarn deploy to deploy a development build to Firebase.

Run yarn deploy:production to deploy a production build to Firebase.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •