hyochan / talktalk-node

(Deprecated via hackatalk-server) Graphql node project using prisma for talktalk.
Other
17 stars 7 forks source link
graphql nodejs prisma

Transferred to HackaTalk

TalkTalk Server (Deprecated!)

codecov CircleCI Greenkeeper badge

This is server application for TalkTalk, the open source chat app built on top of React Native.

Specification

You need to know about below techniques in able to understand the server specifications comfortably.

Versions

The version listed is used in current environment. This must not be identical to your environment.

Tool Version
nodejs 10+
npm 6.4+
prisma 1.2+
mysql 5.7+
docker 18.09+
docker-compose 1.23+

Setting up talktalk-node

Install Docker Desktop

Install the Prisma CLI

Running server

First of all, run cp .env.sample .env to generate environment file.

Basically you need to change nothing but only JWT_SECRET with any value for local dev environment.

Name Description required? default
JWT_SECRET Secret key to enc/dec JWT true
CS_EMAIL_ADDRESS Noreply email address false
SMTP_SERVICE SMTP service provider false
SMTP_HOST SMTP service host false
SMTP_PORT SMTP service port false
SMTP_USER User for SMTP authentication false
SMTP_PASSWORD Password for SMTP authentication false
PRISMA_ENDPOINT Prisma endpoint port true 4466
PRISMA_PORT Prisma endpoint URL true http://localhost:4466
PRISMA_MANAGEMENT_API_SECRET Prisma Management API secret, required for production false
PRISMA_SECRET Prisma service secret, required for production false
PRISMA_DB_CONNECTOR Database connector true mysql
PRISMA_DB_DATABASE Database name false prisma
PRISMA_DB_PASSWORD Database root password false prisma

Start with below steps,

  1. docker-compose up -d
    Run all prisma services in background.

  2. prisma deploy
    Initialize or apply changes of prisma data model to database.

  3. yarn start
    Start Express.js server to provide GraphQL API

Applying schema to database

More details