This API use Deno, Oak, PostgeSQL
Requiriments
- Deno 1.27.x
- Create a
.env
file, copy of theenv.example
. - Create a cache sources running:
$ deno cache deps.ts dev_deps.ts
- Initialize database with:
$ deno task init:db
To see all deno task options, run: deno task
.
- Exceute task
dev
(dev to watch mode):
$ deno task dev
- Tests - execute:
$ deno task test
Method | Path | query | body(json) |
---|---|---|---|
GET | /api/status | ||
GET | /api/cpf | ?like=string&sort=asc | desc |
GET | /api/cnpj | ?like=string&sort=asc | desc |
POST | /api/cpf | {cpf: string} | |
POST | /api/cnpj | {cnpj: string} | |
PUT | /api/cpf/:id | {cpf: string} | |
PUT | /api/cnpj/:id | {cnpj: string} | |
DELETE | /api/cpf/:id | ||
DELETE | /api/cnpj/:id |
Have fun!