Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Airport sorting #35

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

[![Build Status](https://dev.azure.com/caf004m/devops_azure/_apis/build/status/yaotzin68.ContosoAir?branchName=master)](https://dev.azure.com/caf004m/devops_azure/_build/latest?definitionId=1&branchName=master)


# Microsoft.Github CI Demo

Demo website application for Contoso Air.
Runs a nodejs server (Express v4.16) that stores customer booked flights in a CosmosDb database.

## Requirements
### Requirements

* Node v8.9.4 or later
* Azure CosmosDb
Expand Down
24 changes: 24 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pool:
vmImage: 'ubuntu-16.04'
trigger:
- master
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)/Templates'
inputs:
SourceFolder: deployment
Contents: '*.json'
TargetFolder: '$(build.artifactstagingdirectory)/Templates'
- task: Npm@1
displayName: 'npm custom'
inputs:
command: custom
verbose: false
customCommand: 'install --production'
- task: ArchiveFiles@2
displayName: 'Archive $(Build.SourcesDirectory)'
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
includeRootFolder: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
2 changes: 1 addition & 1 deletion src/services/airports.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AirportsService {
}

getAll(){
return this._airports.filter(a => a.code).map(avoidEmptyCity);
return this._airports.filter(a => a.code).map(avoidEmptyCity).sort((a, b) => (a.city > b.city) ? 1 : -1);
}

getByCode(code) {
Expand Down