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+ |
- If you've edited
prisma/prisma.yml
orsrc/schema.graphql
, you mustnpm run prisma:deploy
in order to apply changes to database.
-
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 withprisma generate
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
$ docker-compose up -d
- Run docker in background.
$ npm run prisma:deploy
- Run prisma container
$ npm start
-
$ npm install
-
start
Docker
-
$ docker-compose up -d
- Create and start Docker container in background.
-
$ prisma deploy
- Run prisma container
- You can check on http://localhost:4466/
-
$ npm start
- you can run
$ npm run prisma:local
which can do step 3~5 at once. Caveat
: $ prisma deploy may be failed first execution. It would be working well when you try this again.
$ docker-compose stop prisma mysql
prisma
andmysql
is service name atdocker-compose.yml
Stopping talktalk-node_prisma_1 ... done
$ docker-compose rm prisma mysql
Going to remove talktalk-node_prisma_1 Are you sure? [yN] y Removing talktalk-node_prisma_1 ... done Removing talktalk-node_mysql_1 ... done
$ docker inspect [Mysql Docker Container's Name]
- You can check container's name on
$ docker ps
$ docker-compose logs prisma
- append or change
ports
option in mysql service atdocker-compose.yml
services: prisma: environment: PRISMA_CONFIG: | databases: default: connector: mysql host: mysql user: root password: prisma rawAccess: true port: 3306 migrations: true mysql: image: mysql:5.7 restart: always environment: MYSQL_ROOT_PASSWORD: prisma volumes: - mysql:/var/lib/mysql ports: <- add this - "33061:3306" <- add this volumes: mysql:
- kill and restart docker container
- Go to Workbench and Add MySQL Connections with this info
- Hostname: 0.0.0.0
- Port: 33601
- Username: root
- Password: prisma
- you can run