charity-base / charity-base-schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CharityBase Schema

Installation

npm install --save charity-base/charity-base-schema#v6.0.0

Example

Create an Elasticsearch index of charities registered with the Charity Commission for England & Wales:

const elasticsearch = require('elasticsearch')
const { chc } = require('charity-base-schema')

const client = new elasticsearch.Client({
  host: 'localhost:9200',
})

client.indices.create({
  index: 'charity-base-chc-charities',
  body: {
    mappings: {
      _doc: chc.charity,
    },
  }
}, (err, res) => {
  ...
})

About

License:MIT License


Languages

Language:JavaScript 100.0%