Skip to content

Instantly share code, notes, and snippets.

View kanelv's full-sized avatar
🎯
Focusing

Cuong Le kanelv

🎯
Focusing
View GitHub Profile
@kanelv
kanelv / gist:2753135e8cd35c5e0e26dedfec461b58
Created March 22, 2024 15:24
Running Docker Without sudo
sudo groupadd docker
sudo usermod -aG docker $USER
su - $USER
# log out and log in again to make these changes effective
@kanelv
kanelv / gist:10b94ccbe25a6a99101bc3590c7a3233
Last active March 27, 2024 05:10
REST API Naming Guidelines
# REST API Naming Guidelines
API routes should typically be named using nouns rather than verbs.
This aligns with the principle of using HTTP methods (verbs) like GET, POST, PUT, DELETE, etc., to perform actions on the resources represented by the nouns.
## Some guidelines for naming API routes
1. Use nouns: Name your API routes after the resources they represent. For example, if you have a resource representing users, the route could be /users.
2. Use plural nouns for collections: When dealing with collections of resources, it's a convention to use plural nouns. For example, /users for a collection of users, /posts for a collection of posts, etc.
@kanelv
kanelv / Spring-Boot-Clean-Architecture-DDD
Created April 14, 2024 17:51
Project Folder Structure Diagram for Spring-boot Clean Architecture Demo
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ └── example
│ │ │ ├── adapters
│ │ │ │ ├── controllers
│ │ │ │ │── database
│ │ │ │ │ ├── postgresql # Implementation for PostgreSQL
│ │ │ │ │ │ ├── entities # PostgreSQL entity classes