-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from TaloDev/develop
Release 0.31.0
- Loading branch information
Showing
205 changed files
with
9,106 additions
and
5,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,20 @@ Want to add a new system? Are the docs not clear enough? We're always accepting | |
|
||
## Installation | ||
|
||
1. Clone the repo and run `yarn` or `npm install`. | ||
1. Clone the repo and run `npm install`. | ||
2. Copy `envs/.env.dev` to the project root and rename it to `.env`. | ||
3. Run `yarn up` (or `npm run up`) to spin up the Docker Compose containers. | ||
3. Run `npm run up` to spin up the Docker Compose containers. | ||
4. The backend will be accessible via `http://localhost:3000`. | ||
|
||
## Seeding data | ||
|
||
Run `yarn seed` to seed your database with some fake data like users, events, games and players. | ||
Run `npm run seed` to seed your database with some fake data like users, events, games and players. | ||
|
||
The seed command will create two users: `[email protected]` (an admin user) and `[email protected]` (a dev user with less permissions), both can be logged in with using the password `password`. | ||
|
||
## Testing | ||
|
||
Run `yarn test` to run the unit tests. | ||
Run `npm test` to run the unit tests. | ||
|
||
The tests run against your database container. They'll automatically backup and restore the current state of your database before executing the tests. | ||
|
||
|
@@ -27,15 +27,15 @@ Please make sure to include tests with all pull requests. | |
|
||
## Creating new services | ||
|
||
You can create a new service using the `yarn service:create` command. You need to pass in the name of the entity you want the service to interact with. | ||
You can create a new service using the `npm run service:create` command. You need to pass in the name of the entity you want the service to interact with. | ||
|
||
For example, if you are adding a "Global Stats" service, you would run: `yarn service:create global-stat` (note that the entity name is singular and not a plural). | ||
For example, if you are adding a "Global Stats" service, you would run: `npm run service:create global-stat` (note that the entity name is singular and not a plural). | ||
|
||
This will create a policy, entity and REST API for your new entity. If you want to expose API endpoints (so that it can be used by the Unity SDK), add `--api` to the end of the command. | ||
|
||
## Migrations | ||
|
||
To create a migration, use `yarn migration:create`. This will create a migration class in the `migrations` folder. | ||
To create a migration, use `npm run migration:create`. This will create a migration class in the `migrations` folder. | ||
|
||
Modify the default name of the file from `Migration[Timestamp].ts` to `[Timestamp][PascalCaseDescriptionOfTheMigration].ts`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: '3.9' | ||
|
||
services: | ||
test-db: | ||
image: mysql:8 | ||
command: --default-authentication-plugin=mysql_native_password --sql_mode= | ||
environment: | ||
- MYSQL_DATABASE=${DB_NAME} | ||
- MYSQL_ROOT_PASSWORD=${DB_PASS} | ||
restart: always | ||
healthcheck: | ||
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"] | ||
interval: 2s | ||
timeout: 2s | ||
retries: 10 | ||
ports: | ||
- ${DB_PORT}:3306 | ||
volumes: | ||
- test-data:/var/lib/mysql | ||
networks: | ||
- test-network | ||
|
||
test-redis: | ||
image: bitnami/redis:7.2 | ||
environment: | ||
- REDIS_PASSWORD=${REDIS_PASSWORD} | ||
ports: | ||
- ${REDIS_PORT}:6379 | ||
depends_on: | ||
test-db: | ||
condition: service_healthy | ||
networks: | ||
- test-network | ||
|
||
stripe-api: | ||
image: stripe/stripe-mock:latest | ||
ports: | ||
- 12111:12111 | ||
- 12112:12112 | ||
networks: | ||
- test-network | ||
|
||
volumes: | ||
test-data: | ||
|
||
networks: | ||
test-network: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.