Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexmanno/drunk

A drunk rest api framework made in alcol
https://github.com/alexmanno/drunk

Last synced: 6 days ago
JSON representation

A drunk rest api framework made in alcol

Awesome Lists containing this project

README

        

# Installation

Start docker containers
```sh
docker-compose up -d
```

Get a shell
```sh
docker exec -ti drunk_php_1 bash
```

Install project
```sh
cd /app
composer install
```

Dump sql
```sh
bin/console orm:schema-tool:create
```

# Usage

### Retrieve all users
```sh
curl http://localhost:8080/api/users
```

### Create user
```sh
curl --header "Content-Type: application/json" \
--request POST \
--data '{"username":"mario-rossi","firstName":"Mario","lastName":"Rossi","email":"[email protected]","password":"password"}' \
http://localhost:8080/api/users
```

### Get single user
```sh
curl http://localhost:8080/api/users/1
```