Skip to content

Latest commit

 

History

History

README.md

PhyloPic API Implementation

This is the implementation of the API (Application Programming Interface) for [PhyloPic](https://www.phylopic.org. The documentation for using this API is here: http://api-docs.phylopic.org

This implementation uses:

Most methods retrieve data from a Postgres database. The structure of that database is detailed here: create.sql

The API is hosted at https://api.phylopic.org.

Getting started

See instructions in the PhyloPic project README for setting up the monorepo project.

Environment variables

The following environment variables are required.

Variable Name Description
AUTH_SECRET_KEY Secret key used for authentication
AWS_ACCESS_KEY_ID Amazon Web Services access key ID
AWS_REGION Amazon Web Services region
AWS_SECRET_ACCESS_KEY Amazon Web Services access key
PGHOST Postgres host
PGPASSWORD Postgres password
PGUSER Postgres user
PHYLOPIC_BUILD The number of the current PhyloPic build
PHYLOPIC_BUILD_TIMESTAMP The timestamp associated with the current PhyloPic build
PHYLOPIC_ROOT_UUID The UUID of the root node for PhyloPic

The following environment variables are optional:

Variable Name Description
PGPORT Postgres port (default: 5432)

Linting

To clean up formatting for source files:

yarn lint

Running locally

To run the API on your local machine, on port 3003:

yarn dev

Deploying

To deploy to api.phylopic.org (if you have AWS Command Line Interface set up with proper credentials):

yarn deploy

Authors

License

This project is licensed under the MIT License.