Skip to content

dcramer/cask-server

Repository files navigation

cask-server

Install

$ brew install postgresql postgis
$ pipenv sync
$ psql -c 'create extension postgis;' -U postgres
$ createdb -E utf-8 cask
$ pipenv run python manage.py migrate
$ pipenv run python manage.py runserver

API

The API is a GraphQL implementation powered by Graphene. The endpoint is /graphql/.

Authentication is done via the following:

  1. Perform a login mutation:
mutation{
  login(email:"foo@example.com", password:"bar"){
    errors
    ok
    token,
    user {id, email, name}
  }
}
  1. Capture the token in the response and send it with future requests:
Authorization: Token {value}

Here's a helpful app which lets you bind an auth header:

https://github.com/skevy/graphiql-app

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published