Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (24 loc) · 863 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 863 Bytes

API Documentation

Visit the API endpoint at https://phenobase.github.io/phenobase_data/ for instructions on how to interact with the API

How to Install the API itself

# first time only
npm install

Starting the API

# 1. This reads schema.sql file and initializes all tables
node init.js

# 2. make sure you have `.env` file with SECRET_KEY installed

# 3a. Setup API Listener
node phenobase.api.v1.js

# 3b. Alternatively you can run the `start.sh` script provided to run this under pm2

# The following commands put data into the database (see shell script below for example syntax in working with the API)
`data/all.sh` provides an example for initializing the data repository (datasources and traits tables)

# The sample directory data population script 
`data/sample/all.sh`

Updating API Documentation

apidoc -i . -o docs/