Nytimes app3/4/2023 ![]() Set your app's GOOGLE_APPLICATION_JSON, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_SECRET with values from the service account and Oauth client. This button can quickly deploy to Heroku: Files in the repo and packages specified in the package.json will be included in your library installation.įor more detailed instructions, consult the Getting Started section of the demo site: Using Heroku Set the CUSTOMIZATION_GIT_REPO environment variable to the cloning URL. ![]() If you wish to deploy Library with customizations, create a git repo with the files you would like to include. Wherever you deploy Library, you'll likely want to set up a Google service account and OAuth 2.0 client Set up your service account with API access to Drive and Cloud Datastore. This is covered in the customization readme.Ī sample customization repo is provided at nytimes/library-customization-example. Styles, text, caching logic, and middleware can be customized to To download a fresh copy of the HTML after making edits, run node test/utils/updateSupportedFormats.js. The HTML parsing tests are based on the Supported Formats doc. A coverage report can be generated by running npm run test:cover. You can run functional and unit tests, which test HTML parsing and routing logic, with npm test. Note that Library requires Node v8 or higher. The app should now be running at localhost:3000. Never use NODE_ENV=development for your deployed site, only locally. Make sure to not put any comments in the same line as DRIVE_TYPE and DRIVE_ID vars.Įnsure you share your base drive or folder with the email address associated with the service account created in step 2.īe careful! Setting NODE_ENV to development changes the built in behaviors for site authentication to allow accounts other than those in the APPROVED_DOMAINS list. The string of random numbers and letters at the end of your team drive or folder url. # the ID of your team's drive or shared folder. # Google drive Configuration # team or folder ("folder" if using a folder instead of a team drive) # comma separated list of approved access domains or email addresses (regex is supported). # node environment (development or production) To use the Cloud Datastore API for reading history, you will need to add in your GCP_PROJECT_ID.Ĭreate a.To use oAuth, you will also need to create oAuth credentials.Store these credentials in server/.auth.json. It should have API access to Drive and Cloud Datastore. ![]() Development Workflowįrom the Google API console, create or select a project, then create a service account with the Cloud Datastore User role. We'll do our best to answer your questions. We also keep an eye on the #proj-library channel in the News Nerdery Slack. If you have questions about how to get your copy of Library up and running, join our Google Group, and let us know what you're running into. See CONTRIBUTING.md for information on how to contribute code and/or documentation on GitHub or on the demo site. The Los Angeles Times Data and Graphics Department Contributing Here are some of the organizations using Library so far. You'll also stay up to date with the latest Library features via our release notes, which get sent to this list. Love Library? Let us know by joining our Google Group and dropping us a line. Consult the site for more detailed instructions than this readme about how to get the most out of Library. A collaborative newsroom documentation site, powered by Google Docs.ĭocumentation about how to get started with Library is hosted as a working (read only) demo on Heroku.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |