Skip to content

Commit

Permalink
doc: Deployment to Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
munen committed Aug 3, 2019
1 parent 0fb1dfe commit 2f97ead
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
1 change: 0 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
release:
web: serve build
31 changes: 31 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,42 @@ To run the app, run:
yarn start
#+END_SRC

*** Synchronization back-ends

To test against your actual Dropbox, you'll need to create a ~.env~ file by copying ~.env.sample~ to just ~.env~. To test against your Google Drive you'll need to generate an API key as described on [[https://developers.google.com/drive/api/v3/quickstart/js][this page]].

Note that this will only work if you're running the app on ~http://localhost:3000~ because all redirect URIs must be specified ahead of time on the Dropbox and Google developer consoles.

*** Contributions

To make contributions to this repository, please install [[https://prettier.io/][Prettier]] and use it to format your code. This repository includes a ~.prettierrc.json~ with some configuration options that Prettier will use automatically. I also highly recommend installing [[https://github.com/prettier/prettier-emacs][prettier-emacs]] which will format your files on save, saving you the trouble of manually running Prettier.

** Deployment

org-web is ready to deploy to [[https://heroku.com/][Heroku]].

Assuming, you have an account and have installed the [[https://devcenter.heroku.com/articles/heroku-cli][commandline
tools]], deployment is as easy as:

#+BEGIN_SRC shell
heroku create
git push heroku master
#+END_SRC

Since org-web is a front-end only application, there's not much that
needed to be configured for it to be ready for Heroku. On pushing, the
following happens:

- Heroku installs and runs the [[file:package.json::"engines":%20{][configured Node version]] and then runs
=yarn install=
- Heroku recognizes and runs the [[file:package.json::"build":%20"react-scripts%20build",][build task]]
- In the [[file:Procfile][Procfile]], we configured a web-server to serve the static
assets created by the build task
- The static web-server is installed through the [[file:package.json::"postinstall":%20"npm%20install%20-g%20serve"][postinstall task]]

Please note: If you want the hosted application to connect to Dropbox
or Google Drive, please read the section [[*Synchronization back-ends][Synchronization back-ends]].

** Thanks
org-web is built on the shoulders of giants. These are some packages I rely on that I think are absolutely fantastic:

Expand Down

0 comments on commit 2f97ead

Please sign in to comment.