Packing all of the setup for nprapps/dailygraphics-next into a single repo.
This repo uses the workspaces feature of Yarn. Make sure you have Yarn installed and read more about workspaces.
This repo also uses git submodules. This is a helpful explanation of how git submodules work.
yarn install
# [ ] fill out .env
yarn start
(A lot of this language is cribbed from nprapps/dailygraphics-next.)
To run this project, you'll need Node 10.0 or higher installed. On OS X and Linux, nvm is a good way to install and update Node.
Once you've done that:
-
From GitHub, create a new workspace repo by clicking "Use this template."
-
Clone your repo.
-
Edit
.gitmodules
with your own information. -
Edit
./config.json
with your own information. -
Run
yarn install
to install its dependencies and initialize the submodules. -
In the root repo, fill out
.env
with your:- GOOGLE_OAUTH_CLIENT_ID
- GOOGLE_OAUTH_CONSUMER_SECRET
The Google OAuth variables should match the client ID and secret for an API app that can access your account. This post has details on setting that up.
If you're deploying to S3, which is the default for the rig, you'll also need to set:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
-
Start the rig.
-
If you're using iterm on OS X, just run
yarn start:iterm
. -
Otherwise, in three terminal windows:
# templates cd ./dailygraphics-templates/
# webserver cd ./dailygraphics-next/ source ../.env yarn start
# graphics cd ./graphics-js/
-
See nprapps/dailygraphics-next#Getting started (in more detail)