Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ package-lock.json
.env
.nyc_output
coverage
.DS_Store
.DS_Store
build
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion server/config/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"development": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
"dialect": "postgres",
"dialectOptions": {
"ssl": true
}
},
"test": {
"use_env_variable": "DATABASE_URL_TEST",
Expand Down