Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update to current #11

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

brabster
Copy link

@brabster brabster commented Aug 11, 2018

Fixes #10

Changes implemented as a result of wanting to to a Heroku demo and not wanting to write a frontend! Just drop me a line if you want me to adjust anything or tidy anything up. Good luck with the blog post!

I'll go through and overview changes in individual files.

High-level:

  • updated dependencies, fixed breaks
  • updated style of handlers to use promise chains and destructuring
  • swapped out the manual db migration to use db-migrate
  • set up for Heroku, including:
    • moved environment config to .env approach
    • added Procfile to configure app and release migration
    • added app.json for basic Heroku CI

@@ -0,0 +1,53 @@
'use strict';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a file generated by db-migrate

@@ -1,124 +1,38 @@
const express = require('express');
const router = express.Router();
const pg = require('pg');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pg lib works differently today - breaking changes from original

return res.json(results);
});
});
});
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised by how much boilerplate went away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update dependencies, refactor to promises, Heroku bootstrap
1 participant