Skip to content

Commit 7d75c88

Browse files
committed
#152 Updating readme
1 parent dbb89d5 commit 7d75c88

File tree

1 file changed

+85
-6
lines changed

1 file changed

+85
-6
lines changed

README.md

+85-6
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,94 @@ Pull requests may be reviewed live on Twitch/YouTube.
2525

2626
See the [CONTRIBUTING](CONTRIBUTING.md) guide on how to contribute to the project.
2727

28+
---
2829

29-
## API
30+
## System Requirements
3031

31-
To install the API please read the [wiki page](https://github.com/howToCodeWell/code-quiz/wiki/API)
32+
- Docker
33+
- Docker Compose
34+
- Node
35+
- NPM
36+
- Yarn
3237

33-
## Database
34-
Please read the [wiki page](https://github.com/howToCodeWell/code-quiz/wiki/Database) on how to access and use the database.
38+
---
3539

36-
# API Client
40+
## Local Install
3741

38-
To install the API client please read the [API-Client wiki page](https://github.com/howToCodeWell/code-quiz/wiki/API-Client)
42+
1. Clone the repository
43+
```bash
44+
git clone [email protected]:howToCodeWell/code-quiz.git
45+
```
3946

47+
2. Spin up the containers
48+
49+
```bash
50+
docker-compose up -d
51+
```
52+
53+
3. Install database migrations
54+
```bash
55+
docker-compose exec api bin/console doctrine:migration:migrate
56+
```
57+
58+
4. Load data fixtures
59+
```bash
60+
docker-compose exec api bin/console doctrine:fixtures:load
61+
```
62+
63+
5. Add the following entry to the `/etc/hosts`
64+
65+
```bash
66+
127.0.0.1 codequiz.local
67+
127.0.0.1 api.codequiz.local
68+
```
69+
70+
## Generating the OpenAPI specification
71+
From the `api` folder run the following to create `openapi.yaml` in the `./docs/generated` folder. This is ignored from the code base
72+
```bash
73+
docker-compose exec api bash -c "bin/console api:openapi:export --yaml" > ./docs/generated/openapi.yaml
74+
```
75+
76+
## Accessing the projects
77+
78+
- The API can be reached at [http://api.codequiz.local/api/v1](http://api.codequiz.local/api/v1)
79+
- The website can be reached at [http://codequiz.local/](http://codequiz.local/)
80+
81+
---
82+
83+
# Running the API Client locally
84+
85+
## Install
86+
87+
1. Install the packages
88+
```
89+
yarn install
90+
```
91+
92+
2. Run the mock server
93+
```
94+
yarn start
95+
```
96+
97+
3. Generate the OpenAPI TypeScript module
98+
Make sure you have already generated the openapi spec file.
99+
100+
[See this guide for details](https://github.com/howToCodeWell/code-quiz/wiki/API#generating-the-openapi-specification)
101+
```
102+
yarn run generate-api
103+
```
104+
105+
## Testing
106+
107+
```
108+
yarn run lint
109+
```
110+
111+
```
112+
yarn run test
113+
```
114+
115+
---
116+
# Mobile App
117+
118+
Yet to be built

0 commit comments

Comments
 (0)