About • Features • How it works • Tech Stack • Author • License
This project is a simple API for some Job
routines, such as creating, listing, and activate.
- Create job
- List the all jobs
- Activate the status for a specific job
- List the percentage and number of active jobs by category.
- JWT Token Based Authentication
- API versioning
- JSON Schema implementation
- Setup scripts
This project is Restful API:
- Backend
Before you begin, you will need to have the following tools installed on your machine: docker, docker compose, Git.
In addition, it is good to have an editor to work with the code like VSCode
# Clone this repository
$ git clone https://github.com/fabianoleittes/code-challenge-levee
# Access the project folder cmd/terminal
$ cd code-challenge-levee
# Environment variables
$ make init
# Run the application in development mode
$ make up
# The server will start at port: 3001 - go to http://localhost:3001
# Run tests in container
$ make test
# View logs
$ make logs
Endpoint | HTTP Method | Description |
---|---|---|
/v1/jobs |
POST |
Create jobs |
/v1/health |
GET |
Health check |
Request
curl -i --request POST 'http://localhost:3001/v1/jobs' \
--header 'Content-Type: application/json' \
--data-raw '{
"partner_id": "1",
"title": "Sr Ruby Dev",
"category_id": "1",
"expires_at": "2021-02-15"
}'
Response
{
"id":"68de685e-3a37-431f-ba6b-dcd0076e5138",
"partner_id":"1",
"title":"Sr Ruby Dev",
"status":"draft",
"category_id": "1",
"expires_at":"2021-02-15T14:50:46Z",
"created_at":"2021-02-08T14:50:46Z"
}
The following tools were used in the construction of the project:
API (Golang)
Utilities
- Commit Conventional: Commitlint
- API Test: Insomnia
- Fork the project.
- Create a new branch with your changes:
git checkout -b my-feature
- Save your changes and create a commit message telling you what you did:
git commit -m" feature: My new feature "
- Submit your changes:
git push origin my-feature
If you have any questions check this guide on how to contribute
Fabiano Leite
This project is under the license MIT.