Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

PootisPenserHere/devf-instagram-api

Repository files navigation

Devf instagram api Build Status

This is the back-end for the dev.f batch one of Culiacan, its front-end can be found here

Table of Contents

  1. Preparing the environment
    1. Docker
    2. Docker-compose
  2. Development environment
  3. Playground
    1. Queries
    2. Mutations

Pre requisites

Docker

To install docker in ubuntu 16.04

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt-get update

apt-cache policy docker-ce

sudo apt-get install -y docker-ce

In case of ubuntu 18.04

sudo apt-get install -y docker.io

Docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

Preparing the development environment

To buld the new containers use the following command, the --build flag will force the containers to be rebuilt instead of using the previous ones

docker-compose up --build -d

To tear down the currently running containers

docker-compose down -v

Alternatively both commands may be chained should a problem arise with the containers

docker-compose down -v && docker-compose up --build -d

Playground

Queries

Test

query{
  prueba
}

Mutations

Sing up

mutation{
  signup(
    data: {
      first_name: "Jose Pablo",
      last_name: "Aramburo",
      email: "[email protected]",
      password: "12345678",
      birth_date: "1991/06/06",
      gender: Male
      nationality: "Mexicano"
    }
  ){
    token
  }
}

Login

mutation{
  login(
    email: "[email protected]",
    password: "12345678"
  ){
    token
  }
}