falling-fruit / falling-fruit-api

API (v0.3) for Falling Fruit
https://fallingfruit.org/api/0.3
GNU General Public License v3.0
6 stars 1 forks source link
api express foraging nodejs

Status

Falling Fruit API

NodeJS API using express, pg-promise, and bluebird. The code structure is inspired by this pg-promise demo and this more general tutorial.

You can browse the OpenAPI definition for the main branch here, and for the live API here.

Status

Live at https://fallingfruit.org/api/0.3. Used by https://fallingfruit.org (falling-fruit) and extensively by https://beta.fallingfruit.org (falling-fruit-web).

Layout

Development

Installation

  1. Install Node JS
  2. Install Yarn
  3. Clone this repo, cd into the directory, and install node modules:
git clone https://github.com/falling-fruit/api.git
cd api
yarn
  1. Copy .env.example to .env and update the values as needed.
cp .env.example .env

Usage

yarn start

Visit http://localhost:3300.

Documentation

Validate and build the OpenAPI documentation:

yarn validate && yarn build