diff --git a/.gitignore b/.gitignore index a32a6b4..5cf26f6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ package-lock.json .env .nyc_output coverage -.DS_Store \ No newline at end of file +.DS_Store +build \ No newline at end of file diff --git a/README.md b/README.md index 680f8bd..f8a507a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://travis-ci.org/Raywire/postgres-express-node.svg?branch=develop)](https://travis-ci.org/Raywire/postgres-express-node) +[![Build Status](https://ryanwire.visualstudio.com/postgres-express-node/_apis/build/status/Raywire.postgres-express-node?branchName=develop)](https://ryanwire.visualstudio.com/postgres-express-node/_build/latest?definitionId=2&branchName=develop) [![Coverage Status](https://coveralls.io/repos/github/Raywire/postgres-express-node/badge.svg?branch=develop)](https://coveralls.io/github/Raywire/postgres-express-node?branch=develop) [![Maintainability](https://api.codeclimate.com/v1/badges/af62aca2e06bd8f4da6f/maintainability)](https://codeclimate.com/github/Raywire/postgres-express-node/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/af62aca2e06bd8f4da6f/test_coverage)](https://codeclimate.com/github/Raywire/postgres-express-node/test_coverage) @@ -94,6 +95,9 @@ npm test ## Hosted on Heroku [Heroku Link](https://todos-node-app.herokuapp.com/) +## Hosted on Microsoft Azure +[Azure Link](https://postgres-express-node-todos.azurewebsites.net) + ## Notes All routes apart from `auth/login` and `auth/signup` require Authorization using a JSON Web Token diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..e02ca62 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,33 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master +- develop + +variables: +- group: postgres-express-node + +pool: + vmImage: 'ubuntu-latest' + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + displayName: 'npm install' + +- task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + +- task: PublishBuildArtifacts@1 + displayName: 'Publish artifacts: drop' diff --git a/package.json b/package.json index dbf8ab3..8b27066 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "start": "node ./bin/www", "start:dev": "nodemon ./bin/www", + "build": "exit 0", "test": "NODE_ENV=test npm run reset:db && NODE_ENV=test nyc mocha --timeout 5000 server/tests/**/*.spec.js", "migrate": "sequelize db:migrate", "reset:db": "sequelize db:migrate:undo:all && npm run migrate", diff --git a/server/config/config.json b/server/config/config.json index 6d57a75..2e07293 100644 --- a/server/config/config.json +++ b/server/config/config.json @@ -1,7 +1,10 @@ { "development": { "use_env_variable": "DATABASE_URL", - "dialect": "postgres" + "dialect": "postgres", + "dialectOptions": { + "ssl": true + } }, "test": { "use_env_variable": "DATABASE_URL_TEST",