GithubHelp home page GithubHelp logo

directus's Introduction

directus

It is a repository for Directus Headless CMS (https://directus.io/)

Installation

  1. Docker and docker-compose are the pre-requisites.
  2. Clone the repository
  3. Copy _env to .env
  4. Edit .env file and replace the values in DIR_KEY, DIR_SECRET, PGADMIN_PASSWORD, DB_PASSWORD, ADMIN_PASSWORD parameters by running for each a separate bash command openssl rand -base64 16
  5. Update the docker-compose.yml file, image name (currently directus/directus:latest) to the particular version if required
  6. Start with the command ./start.sh (respectively stop by ./stop.sh)

REST API

REST API can be reached by the URL (for collections): http://localhost:8055/items/customers/ where - localhost:8055 - a host and a port (see DIR_PORT) - customers - a collection name


GraphQL

GQL is a powerful query language for the GraphQL API endpoint: http://localhost:8055/graphql?access_token=mysecretpass where - localhost:8055 - a host and a port (see DIR_PORT) - mysecretpass - personal user token, defined by the admin in a user profile

Get all records from the collection customers where field rec_id is equal to "3453676575676":

query {
  customers (filter: { rec_id: { _eq: "3453676575676" } })
  {
    	rec_id
    	kyc_level
  }
}

search the collection customers for any field matching the value "435":

query {
  customers (search: "435")
  {
    	rec_id
    	kyc_level
  }
}

get the record from the collection customers where the id field is "1":

query {
  customers_by_id (id: 1)
  {
    	rec_id
    	kyc_level
  }
}

get the record from the collection customers where the id field is "1" and show branch name where the customer is registered:

query {
  customers_by_id (id: 1)
  {
    	id
    	rec_id
    	kyc_level
    	branch_id {branch_name}
  }
}

directus's People

Contributors

vmelnych avatar

Stargazers

Lance Curry avatar Haluk avatar

Watchers

 avatar

directus's Issues

improvement to add caddy for easier server config

This repo is just fantastic. Thank you for your work.

Do you think we can add caddy to the docker-compose config introduce automatic TLS renewal for https connection, and introduce server layer on top of docker container for reverse proxy so that we can have easier way to deal with server configs?

Let me know what you think. @vmelnych

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.