Chirpy is a microblogging application built with Go, offering functionalities similar to Twitter. It utilizes a RESTful API architecture and includes features for managing chirps (posts) and users.
- CRUD functionalities for chirps
- User management
- Password-based authentication
- Bcrypt hashing for password storage
- JSON Web Tokens (JWT) for authentication
- Go (Golang)
- RESTful API
- Bcrypt hashing
- JSON Web Tokens (JWT)
- Clone the repository:
git clone github.com/friday1602/chirpy
- Install dependencies:
go mod download
- Configure environment variables:
- Edit
.env
file with your configurations.
- Build and run the application:
go build -o chirpy && ./chirpy
- Create a new user using
POST /api/users
. - Login with your credentials using
/api/login
to obtain a JWT token. - Use the obtained JWT token for authentication in subsequent requests to protected endpoints.