From 71b13477c15bc067e03bac88c7581143ea672577 Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 17:33:30 +0100 Subject: [PATCH 1/8] chore: minor change --- src/bin/www.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/www.js b/src/bin/www.js index 0fc86d8..bb3f3c2 100755 --- a/src/bin/www.js +++ b/src/bin/www.js @@ -41,11 +41,11 @@ const onError = error => { // handle specific listen errors with friendly messages switch (error.code) { case 'EACCES': - alert(`${bind} requires elevated privileges`); + console.log(`${bind} requires elevated privileges`); process.exit(1); break; case 'EADDRINUSE': - alert(`${bind} is already in use`); + console.log(`${bind} is already in use`); process.exit(1); break; default: From e5342b14b20914e88853ebb4921fc2b593bb6af3 Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 19:16:34 +0100 Subject: [PATCH 2/8] chore: update travis settings --- .travis.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2551927..27f7ab7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,34 +1,32 @@ - language: node_js env: global: - - CC_TEST_REPORTER_ID=d81e3aa75f9409a117901b091fc35106f0ebf9a147e3b8108f92c5a4913bfc0d + - CC_TEST_REPORTER_ID=d81e3aa75f9409a117901b091fc35106f0ebf9a147e3b8108f92c5a4913bfc0d matrix: include: - node_js: '12' cache: - directories: [node_modules] -install: - yarn + directories: + - node_modules +install: yarn after_success: yarn coverage before_script: - - psql -c 'create database testdb;' -U postgres - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build +- psql -c 'create database testdb;' -U postgres +- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter +- chmod +x ./cc-test-reporter +- "./cc-test-reporter before-build" script: - - yarn test +- yarn test after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - +- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT" services: - - postgresql +- postgresql addons: - postgresql: "10" + postgresql: '10' apt: packages: - postgresql-10 - postgresql-client-10 before_install: - - sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf - - sudo /etc/init.d/postgresql restart +- sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf +- sudo /etc/init.d/postgresql restart From 56c1687a8233f4a430d51ed5b09748d52358af7c Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 19:20:58 +0100 Subject: [PATCH 3/8] chore: minor change - test if this works as expected --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 27f7ab7..7ba6a08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,8 @@ install: yarn after_success: yarn coverage before_script: - psql -c 'create database testdb;' -U postgres -- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter +- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 + > ./cc-test-reporter - chmod +x ./cc-test-reporter - "./cc-test-reporter before-build" script: From 4388ff380b553f7b898ea7082248104e763a286e Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 19:29:57 +0100 Subject: [PATCH 4/8] chore: configure continuous deployment with travis --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7ba6a08..64d2b29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,3 +31,9 @@ addons: before_install: - sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf - sudo /etc/init.d/postgresql restart +deploy: + provider: heroku + app: + master: express-api-template + api_key: + secure: IZsokzJPsQ35yHoOZvsJrC0vfgN5Xso2uBRmWUDZWxOgGoCjiHQ1cpff/tyNOe6lgnNMw+IRHR146GOJWcxy380bWElF871Iy5sjf/P8Zwu9IQ+ltlJ0IOSjuJvW0+trhi8FBKKl8Cj0Rfi9yL+zU7azw6XfVhDFLjemHvfkMjDgGtL2cF9qBQPoNCm4b0I477NIk0pkKVl7pIFFLlOBgdy5bBCYIsmcgcWZ/lfnu7T86yQLT7QRsh2Ky6R5q62bwjxZqUn9qKP64iokfpdcZbi5LzUZ3TVCQBcWMVVLIG96nWJ6DUicL0mLdvMzwyz2kNj+WJCVVn4HaSLzkcEQis0RDbP2cr5I9xsHsoCtTQNRuJiBhYMtdE5Dv4ywNVJjbwGk7kZaq1bVoRzuX1gmEoofp2238q0OuHFnwuwjleZEq5vcwO80nQlHFHCDsciEoHmxcdG54pxMcmqTDXzGnULRkLRz3l1IhZsAPZmWuYQ+O2lVQVnnDSoaVT9qGwrff6SOu5ILJEj2oan3FB1F6I1FCx0AyRu2GdpqzcxsSAnUZzbcX9h4xSV5GcXh910qddys5iuuPs7WX6CfKEXfX033qNJC7hMVHjO509jvkZbPsw7BLdwqLAUejFwCL//gSL+NH0NegUVOrPkWNyskX0rPqPE1+lfKsSPMYwU2NQU= From fa23b848887b1c9f21cb2f5c43dab43dcdeefe3f Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 17:33:30 +0100 Subject: [PATCH 5/8] chore: minor change --- src/bin/www.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/www.js b/src/bin/www.js index 0fc86d8..bb3f3c2 100755 --- a/src/bin/www.js +++ b/src/bin/www.js @@ -41,11 +41,11 @@ const onError = error => { // handle specific listen errors with friendly messages switch (error.code) { case 'EACCES': - alert(`${bind} requires elevated privileges`); + console.log(`${bind} requires elevated privileges`); process.exit(1); break; case 'EADDRINUSE': - alert(`${bind} is already in use`); + console.log(`${bind} is already in use`); process.exit(1); break; default: From 761d3ba595c4d3efc9abaec108e1b17a2a522a83 Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 19:16:34 +0100 Subject: [PATCH 6/8] chore: update travis settings --- .travis.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2551927..27f7ab7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,34 +1,32 @@ - language: node_js env: global: - - CC_TEST_REPORTER_ID=d81e3aa75f9409a117901b091fc35106f0ebf9a147e3b8108f92c5a4913bfc0d + - CC_TEST_REPORTER_ID=d81e3aa75f9409a117901b091fc35106f0ebf9a147e3b8108f92c5a4913bfc0d matrix: include: - node_js: '12' cache: - directories: [node_modules] -install: - yarn + directories: + - node_modules +install: yarn after_success: yarn coverage before_script: - - psql -c 'create database testdb;' -U postgres - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build +- psql -c 'create database testdb;' -U postgres +- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter +- chmod +x ./cc-test-reporter +- "./cc-test-reporter before-build" script: - - yarn test +- yarn test after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - +- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT" services: - - postgresql +- postgresql addons: - postgresql: "10" + postgresql: '10' apt: packages: - postgresql-10 - postgresql-client-10 before_install: - - sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf - - sudo /etc/init.d/postgresql restart +- sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf +- sudo /etc/init.d/postgresql restart From 16c9406a48a0bb9e37db44d865035e2dfb183f53 Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 19:20:58 +0100 Subject: [PATCH 7/8] chore: minor change - test if this works as expected --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 27f7ab7..7ba6a08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,8 @@ install: yarn after_success: yarn coverage before_script: - psql -c 'create database testdb;' -U postgres -- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter +- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 + > ./cc-test-reporter - chmod +x ./cc-test-reporter - "./cc-test-reporter before-build" script: From 769cecbc584913b69734a92f87e84efb85e907aa Mon Sep 17 00:00:00 2001 From: Chidi Orji Date: Sat, 21 Mar 2020 19:29:57 +0100 Subject: [PATCH 8/8] chore: configure continuous deployment with travis --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7ba6a08..64d2b29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,3 +31,9 @@ addons: before_install: - sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf - sudo /etc/init.d/postgresql restart +deploy: + provider: heroku + app: + master: express-api-template + api_key: + secure: IZsokzJPsQ35yHoOZvsJrC0vfgN5Xso2uBRmWUDZWxOgGoCjiHQ1cpff/tyNOe6lgnNMw+IRHR146GOJWcxy380bWElF871Iy5sjf/P8Zwu9IQ+ltlJ0IOSjuJvW0+trhi8FBKKl8Cj0Rfi9yL+zU7azw6XfVhDFLjemHvfkMjDgGtL2cF9qBQPoNCm4b0I477NIk0pkKVl7pIFFLlOBgdy5bBCYIsmcgcWZ/lfnu7T86yQLT7QRsh2Ky6R5q62bwjxZqUn9qKP64iokfpdcZbi5LzUZ3TVCQBcWMVVLIG96nWJ6DUicL0mLdvMzwyz2kNj+WJCVVn4HaSLzkcEQis0RDbP2cr5I9xsHsoCtTQNRuJiBhYMtdE5Dv4ywNVJjbwGk7kZaq1bVoRzuX1gmEoofp2238q0OuHFnwuwjleZEq5vcwO80nQlHFHCDsciEoHmxcdG54pxMcmqTDXzGnULRkLRz3l1IhZsAPZmWuYQ+O2lVQVnnDSoaVT9qGwrff6SOu5ILJEj2oan3FB1F6I1FCx0AyRu2GdpqzcxsSAnUZzbcX9h4xSV5GcXh910qddys5iuuPs7WX6CfKEXfX033qNJC7hMVHjO509jvkZbPsw7BLdwqLAUejFwCL//gSL+NH0NegUVOrPkWNyskX0rPqPE1+lfKsSPMYwU2NQU=