Skip to content

comopedir/comopedir-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

138 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Como Pedir - Graphql API

This repo contains a data API backend using Node.js and GraphQL for Como pedir API.

Tech Stack

Prerequisites

  • Node.js v10 + Yarn package manager (Actually with problems using node v13)
  • PostgreSQL (can be local or remote instance

Getting Started

Just clone the repo, tweak .env file in the root of the project, and run yarn start:

$ git clone https://github.com/comopedir/comopedir-api comopedir-api
$ cd comopedir-api                # Change current directory to the newly created one
$ yarn install                    # Install Node.js dependencies
$ yarn start                      # Launch Node.js API application. Or, yarn start --env=local

The API server must become available at http://localhost:8080/graphql.

For non-production enviroments, the endpoint will show the GraphiQL IDE interface to navigate inside API.

How to Migrate Database Schema

While the app is in development, you can use a simplified migration workflow by creating a local copy of the database, making changes to the existing migration files (see migrations/ folder), re-apply the migration and run the knex commands to create or update database structure:

$ knex:migrate latest           # Will run the scripts until the latest migration

Tip: Use knex:migrate without parameters to see entire knex working flow for migrations.


This project is inspired in some architectural aspects from Node.js API Starter Kit, using some code of the original project.

About

Como pedir GraphQL API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published