Skip to content

Commit d80c5a1

Browse files
committed
improve readme
1 parent a1c5b37 commit d80c5a1

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,35 @@ Then set up the database by running the following commands on the command line:
6060
./yii migrate/up
6161
./yii faker
6262

63+
## Try it
64+
65+
cd api
66+
make start
67+
68+
Your API is now available at `http://localhost:8337/`. Try to access an endpoint of your spec via `curl`:
69+
70+
$ curl http://localhost:8337/pets
71+
[
72+
{
73+
"name": "Eos rerum modi et quaerat voluptatibus.",
74+
"tag": "Totam in commodi in est nisi nihil aut et."
75+
},
76+
{
77+
"name": "Voluptas quia eos nisi deleniti itaque aspernatur aspernatur.",
78+
"tag": "Temporibus id culpa dolorem sequi aut."
79+
},
80+
{
81+
"name": "Facere aut similique laboriosam omnis perferendis et.",
82+
"tag": "Quo harum quo et ea distinctio non quam."
83+
},
84+
...
85+
]
86+
87+
88+
# Support
89+
90+
Professional support, consulting as well as software development services are available:
91+
92+
https://www.cebe.cc/en/contact
93+
94+
Development of this library is sponsored by [cebe.:cloud: "Your Professional Deployment Platform"](https://cebe.cloud).

api/config/components.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
'response' => [
2020
'class' => yii\web\Response::class,
2121
'format' => yii\web\Response::FORMAT_JSON,
22+
'formatters' => [
23+
yii\web\Response::FORMAT_JSON => [
24+
'class' => \yii\web\JsonResponseFormatter::class,
25+
'prettyPrint' => YII_DEBUG,
26+
],
27+
],
2228
],
2329
'urlManager' => [
2430
'enablePrettyUrl' => true,

0 commit comments

Comments
 (0)