dev-mansonthomas / RedQuest

GNU General Public License v3.0
1 stars 0 forks source link

Getting started

Install angular-cli : https://cli.angular.io/

Run npm install

Enjoy

GCloud setup

Install command line tools

Install gcloud sdk

see : https://cloud.google.com/sdk/docs/downloads-interactive

Install firebase tools

npm install -g firebase-tools

Setup rights in Google Cloud Platform with IAM

Add the gmail or GSuite account as project owner

Login & set default project

Login : gcloud init use the gmail account (or gsuite account) that was used in the previous chapter

Set the correct project : gcloud config set project rq-fr-dev

RedQuest

This project was generated with Angular CLI version 7.0.5.

Start a server

Prepare environments

Get the environment files from the Google Drive (ask a developer) and put them at /src/environments/. Once done you should have :

$ ls src/environments/
environment.dev.ts
environment.prod.ts
environment.sample.ts
environment.test.ts
environment.ts

Development server:

Test server:

Production server:

- CAUTION: do not use this environment, unless someone asked you to use it !

Notes:

Once started you can navigate to http://localhost:4200/.

In all three cases above, after the ng serve call, 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. 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 the --prod flag for a production build.

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.

To deploy with firebase

install firebase tools:

npm install -g firebase-tools

firebase login

To test authentication:

firebase projects:list

firebase use --add {project-id}

To deploy project:

run ng build --prod to generate sources to be deployed run firebase deploy and follow instructions