Giter Site home page Giter Site logo

baaraakaa / eao-public Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bcgov/eao-public

0.0 2.0 0.0 2.69 MB

Public Microservice for EAO's EPIC application

License: Apache License 2.0

TypeScript 64.56% Groovy 4.29% JavaScript 0.41% Dockerfile 0.13% Shell 0.89% HTML 17.40% CSS 12.32%

eao-public's Introduction

eao-public

Prerequisites

Node and NPM

Node 6.x must be installed.

Install angular/cli

Note, use angular/cli, do not use angular/angular-cli

npm i -g @angular/cli

ng is the CLI itself

Verify the installation

npm list -g @angular/cli --depth=0
ng -v

Install yarn

npm i -g yarn

Fork, Build, and Deployment

  1. After installing Node and Yarn, you can fork or straight download a copy of this application to start your own app.
  2. First download all the dependencies with yarn install
  3. Please set your PATH, MINIO_HOST, MINIO_ACCESS_KEY, MINIO_SECRET_KEY, and MONGODB_DATABASE variables before running.
  • export MONGODB_DATABASE=“mean-dev”

  • export MINIO_HOST="minio-esm-dev-esm-dev.pathfinder.gov.bc.ca"

  • export PATH="[you path here]"

  • export MINIO_ACCESS_KEY="[access key here]"

  • export MINIO_SECRET="[secret key here]"

  1. Run npm start to start the webpack server to run the application on port 3300

    Navigate to http://localhost:3300 to verify that the application is running

    💡 To change the default port, open .angular-cli.json, change the value on defaults.serve.port

  2. Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build, like so: ng serve --prod to run in production mode.

  3. Run npm run lint to lint your app code using TSLint

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|module.

Example: Generate a customer component

ng g c customer

Example: Generate a directive: search-box

ng g d search-box

Example: Generate a service: general-data

ng g s general-data

Angular will give out a warning line after this command,

WARNING Service is generated but not provided, it must be provided to be used

After generating a service, we must go to its owning module and add the service to the providers array.

Example: Generate a service and include it in a module automatically

ng g s general-data2 -m app.module

Example: Generate a class, an interface and enum

# class
ng g cl models/customer

# interface
ng g i models/person

# enum
ng g enum models/gender

Example: Generate a pipe

ng g pipe shared/init-caps

Generate a module

Create a login directory and generate a login module in that directory

ng g module login/login.module

Add/Generate Routing Features

Generate a module called admin and add routing feature to it.

ng g module admin --routing

Running Tests

Unit tests

The tests use Karma, Jasmine.

  1. Run npm test to execute the unit tests.

End-to-end functional tests

Set up with BDDStack.

Run tests against local application:

  1. Run npm run e2e to automatically start the application locally and execute the end-to-end tests.

Run tests against remote application:

  1. Determine the URL at which the application is running.
  2. Update the baseurl to the URL from step 1:
    1. Either modify the GebConfig.groovy baseUrl directly.
    2. Or set a BASEURL environment variable
  3. See functional-tests/readme.md for how to execute the tests.

See the BDDStack Wiki for more information.

Change aspects of the application

Change style dialect

ng set default.styleExt css

Regenerate a brand new project with routing and scss options

ng new my-app --routing --style scss

Getting Help

  1. To get more help on the Angular CLI use ng help or go check out the Angular CLI README
  2. ng doc component to look up documentation for features
  3. ng serve --help to look up doc for ng serve command

Build and Deployment

For dev, test, and production builds on OpenShift/Jenkins see openshift/README.md for detailed instructions on how to setup in an OpenShift environment using nginx.

Visual Studio Code

To use our Visual Studio Code extensions copy the contents of vscodeextensions.txt in the root directory and paste it into bash. If it doesnt work, make sure you have the Code CLI installed code --version and if it's not installed open the command palette (shift + command + p) and run Shell Command: install 'code' command in PATH.

How to Contribute

Feel free to create pull requests from the default "master" branch, click here to create one automatically: https://github.com/bcgov/eao-public/pull/new/master

eao-public's People

Contributors

actionanalytics avatar adrielai avatar asanchezr avatar btzc avatar esune avatar fieranmason avatar jeznorth avatar keifere avatar kylecjo avatar logancodes avatar marklise avatar maxwardle avatar nickphura avatar rpyyj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.