A project with opinionated architecture that is used as the basis for new projects.
Resources that must be installed for this project to work.
Primary libs and resources used in this project
This project use gitmoji-cli for commit messages
src
├── directives
│ └── *.directive.js
├── index.js
├── resolvers
│ ├── fields // fields resolvers
│ ├── mutations // mutation resolvers
│ └── resources.js // for auto ganeration
├── server // server builder
├── services
│ ├── factories // services factories
│ └── index.js
├── type-defs
│ └── *.graphql
└── utils
This project uses docker-compose to upload all the services it depends on to work.
Copy .env.example to .env
cp .env.example .envAPP_KEY is very important. All tokens use this env. Do not change in production.
See config/default.js for more info.
Up service with auto reload when change source files
yarn run docker:devThe graphql server will bi aveilable in http://localhost:7373 by default, see PORT env for confirmation.
When docker up in dev mode, follow below commands will run.
yarn run knex:migrate
yarn run knex:seedThis commands configure and populate the database.
See package.json > scripts for more info.
If You need run commands inside container use
yarn run docker:dev:exec sh
When run project in development mode, pgadmin4 will be available in http://localhost:16543
Use local@local.dev and value of DB_PASSWORD to access pgadmin4
Up to 2 pm2 service in cluster mode.
yarn run docker:prod