Skip to content

rzldimam28/simple-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Notes

a simple RESTful API for crud database operation

🛠 Tech Stack

  • Go
  • MySQL
  • Gorillamux

📄 Reference

📌 Endpoints

🧍‍♂️ USERS

/users/login - POST Login URL. Generate a Json Web Token. Example of request body:

{
  "username": "imamrizaldi",
  "password": "donggala"
}

/users - POST Create a new user. Example of request body:

{
  "username": "johndoe",
  "password": "janedoe"
}

/users - GET Fetch all users

✏ NOTES

All of notes endpoints will be needed a JSON WEB TOKEN Auth that generated from /login.

/notes - POST Create new note. Example of request body:

{
  "title": "Golang",
  "content" : "Tutorial Golang Dasar"
}

/notes - GET Fetch all notes

/notes/{id} - GET Get note by ID

/notes/{id} - PUT Update note. Example of request body:

{
  "title": "Golang",
  "content" : "Tutorial Golang MySQL"
}

/users/notes/{id} - DELETE Delete note


🔜 Feature to Add:

  • JWT auth (done✅)
  • Unit testing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages