Skip to content

Commit

Permalink
bash code fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SirDomin committed Apr 29, 2020
1 parent 89aaec1 commit 1575454
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
31 changes: 16 additions & 15 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ After that a full JSON/XML CRUD API is ready to use.
Sounds crazy? Spin up the built-in server and give it a try:
```bash
php bin/console server:run
php bin/console server:run
```
You should see something like:

```bash
Server running on http://127.0.0.1:8000
Server running on http://127.0.0.1:8000

Quit the server with CONTROL-C.
Quit the server with CONTROL-C.
```
Now, in a separate Terminal window, call these commands:

```bash
curl -i -X POST -H "Content-Type: application/json" -d '{"title": "Lord of The Rings", "author": "J. R. R. Tolkien", "description": "Amazing!"}' http://localhost:8000/books/
curl -i -X GET -H "Accept: application/json" http://localhost:8000/books/
curl -i -X POST -H "Content-Type: application/json" -d '{"title": "Lord of The Rings", "author": "J. R. R. Tolkien", "description": "Amazing!"}' http://localhost:8000/books/
curl -i -X GET -H "Accept: application/json" http://localhost:8000/books/
```
As you can guess, other CRUD actions are available through this API.

Expand All @@ -109,16 +109,17 @@ This will generate routing for HTML views.
Run the ``debug:router`` command to see available routes:
```bash
php bin/console debug:router

------------------------ --------------- -------- ------ -------------------------
Name Method Scheme Host Path
------------------------ --------------- -------- ------ -------------------------
app_book_show GET ANY ANY /books/{id}
app_book_index GET ANY ANY /books/
app_book_create GET|POST ANY ANY /books/new
app_book_update GET|PUT|PATCH ANY ANY /books/{id}/edit
app_book_delete DELETE ANY ANY /books/{id}
php bin/console debug:router
```
```
------------------------ --------------- -------- ------ -------------------------
Name Method Scheme Host Path
------------------------ --------------- -------- ------ -------------------------
app_book_show GET ANY ANY /books/{id}
app_book_index GET ANY ANY /books/
app_book_create GET|POST ANY ANY /books/new
app_book_update GET|PUT|PATCH ANY ANY /books/{id}/edit
app_book_delete DELETE ANY ANY /books/{id}
```

Do you need **views** for your newly created entity? Read more about
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Use the following command to add the bundle to your ``composer.json`` and downlo
If you have [Composer installed globally](http://getcomposer.org/doc/00-intro.md#globally).

```bash
composer require sylius/resource-bundle
composer require sylius/resource-bundle
```
Otherwise you have to download .phar file.

```bash
curl -sS https://getcomposer.org/installer | php
php composer.phar require sylius/resource-bundle
curl -sS https://getcomposer.org/installer | php
php composer.phar require sylius/resource-bundle
```
## Adding Required Bundles to The Kernel

Expand Down

0 comments on commit 1575454

Please sign in to comment.