GithubHelp home page GithubHelp logo

joealden / talq-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 568 KB

The API for Talq built with Prisma and graphql-yoga.

Home Page: https://talq-api.joealden.com/

License: MIT License

Shell 0.28% TypeScript 99.72%
typescript graphql prisma graphql-yoga

talq-api's Introduction

Talq API

The API for Talq built with Prisma and graphql-yoga.

talq-api screenshot

Main Talq Repository

Visit https://github.com/joealden/talq-client-web to see the front-end code that uses this API.

Usage

IMPORTANT

Before running either the development or the production server, it is important that a .env file has been created in the root of the project with the following environment variables:

  • APP_PORT (Number) - The port to run the development server on.
  • FRONTEND_URL (String) - The address of the front-end of the site.
  • PRISMA_ENDPOINT (String) - The Prisma service endpoint (see below section).
  • PRISMA_SECRET (String) - The secret that will be used to setup the Prisma service.
  • APP_SECRET (String) - The secret that will be used to secure the API.

An example .env file can be found at .env.example.

Setting up a Prisma Service for the API

Before proceeding, please ensure that you have made a .env file with at least the PRISMA_SECRET and APP_SECRET filled in. This is because the below command needs to use these two variables to secure the Prisma service.

Run this command and follow the instructions given:

yarn prisma deploy

The command above will setup a Prisma service for the API. Think of a Prisma service as the interface between the API server and the database. The above command should give a Prisma service endpoint that you will need to insert into the .env file.

Development

To start the development server, run the following commands:

yarn
yarn dev

Production

To build the production files and start the production server, run the following commands:

yarn
yarn build
yarn start

talq-api's People

Contributors

joealden avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.