Skip to content

kayooliveira/dinodo-api-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DinoDO - Go-based Todo List API

DinoDO

Description

DinoDO is a simple Todo List API developed in Go, utilizing the following tools:

The application uses a MySQL database to store tasks.

Features

  • Task Creation: Add new tasks to the list.
  • Task Editing: Update the content or status of an existing task.
  • Task Listing: View all available tasks.
  • Task Listing By ID: View task by provided ID.
  • Delete Tasks: Remove tasks from the list.
  • JWT Authentication: Secure routes with JSON Web Token authentication.

Configuration

  1. Install dependencies:

        go mod tidy
  2. Set up environment variables:

    • Create a .env file in the project root and configure the necessary variables. An example is provided in the .env.example file.
  3. Run the application:

    go run main.go

    The application will be available at http://localhost:4000.

Usage Examples

Task Creation

curl -X POST http://localhost:4000/api/v1/tasks -d '{"task": "New Task", "finished":false}'

Task Editing

curl -X PUT http://localhost:4000/api/v1/tasks/{id} -d '{"title": "Updated Task", "finished": true}'

Task Listing

curl http://localhost:4000/api/v1/tasks

Task Listing By ID

curl http://localhost:4000/api/v1/tasks/{id}

Delete Task

curl -X DELETE http://localhost:4000/api/v1/tasks/{id}

User Register

curl -X POST http://localhost:4000/auth/register -d '{"name": "User Name","email": "[email protected]", "username": "example", "password": "password"}'

Get User Details

curl http://localhost:4000/users/{id} -H "Authorization: Bearer <your_token>"

Contributions

Contributions are welcome! Feel free to open issues and pull requests.

License

This project is for educational purposes only and is licensed under the MIT License. MIT License.

About

An API made in GO for a React Native Task List application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages