Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Latest commit

 

History

History
executable file
·
29 lines (18 loc) · 1.15 KB

README.md

File metadata and controls

executable file
·
29 lines (18 loc) · 1.15 KB

ARCHIVED - The API definition is now combined with the database in this repo: https://github.com/nasa-petal/PeTaL-db

PeTaL (Periodic Table of Life) API

The Periodic Table of Life (PeTaL, pronounced petal) is a design tool aimed at allowing users to seemlesly move from ideas (from nature or other sources) to design.

PeTaL is comprised of multiple interconnected services. This repository is for the API. There are other repositories for the ReactJS web front end client, PostgreSQL database server, and Labeller.

Getting Started

clone this repo

option 1: run locally (easiest)
npm install
npm start
curl -i localhost:8080/v1/functions

option 2: run in docker container
docker build -t petal-api .
docker run --name petal-api -p 8080:8080 -d petal-api --mount type=bind,source="$(pwd)"/server.js,target=/app
curl -i localhost:8080/v1/functions

connect to docker container
docker exec -it petal-api /bin/bash

Used this guide to do initial setup https://nodejs.org/en/docs/guides/nodejs-docker-webapp/