Welcome to the talktalk-node wiki!
This is backend application for talktalk built in react-native. TalkTalk is an opensource chat app under construction.
You need to know about below techniques in able to understand the server specifications comfortably.
The version listed is used in current environment. This must not be identical to your environment.
Tool | Version |
---|---|
babeljs | 7+ |
nodejs | 10+ |
npm | 6.4+ |
prisma | 1.2+ |
mysql | 5.7+ |
docker | 18.09+ |
docker-compose | 1.23+ |
-
npm install -g prisma or brew tap prisma/prisma brew install prisma
Caution
: prisma installation via npm recommended.Error: Cannot find module 'generate'
- when you execute local test via
prisma deploy
command at post-deploy hook setting inprisma.yml
, this error occured in prisma Homebrew installation. - that error not fixed in Homebrew installation yet.
- so install via npm
- GitHub issues: Error: Cannot find module 'generate'
- when you execute local test via
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 | |
DEBUG | Flag to enable debug mode | false | |
PRISMA_ENDPOINT | Prisma endpoint URL | true | http://localhost:4466 |
PRISMA_MANAGEMENT_API_SECRET | Prisma service secret, required for production | false | |
PRISMA_DB_CONNECTOR | Database connector | true | mysql |
PRISMA_DB_DATABASE | Database name | true | prisma |
PRISMA_DB_USER | Database username | true | prisma |
PRISMA_DB_PASSWORD | Database password | true | prisma |
Then,
-
docker-compose up -d
Run all prisma services in background. -
prisma deploy
Initialize or apply changes of prisma data model to database. -
npm start
Start Express.js server to provide GraphQL API
- If you've edited
prisma/datamodel.prisma
, you mustprisma deploy
in order to apply changes to database.