Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chirpy

Chirpy is a simple Twitter-like backend API service built with Go.

Features

  • User Management: Create users and authenticate with JWT.
  • Chirps: Post, delete, and retrieve "chirps" (short messages).
  • Authentication: JWT-based authentication with support for refresh tokens.
  • Database: PostgreSQL with SQLC for type-safe database access.
  • Migrations: Database schema managed with SQL migrations.

Tech Stack

Getting Started

  1. Clone the repository.
  2. Set up your environment variables in a .env file (see .env.example if available).
  3. Run migrations using Goose.
  4. Build and run the service:
    go build -o chirpy && ./chirpy

Running with Docker

You can build and run Chirpy in a container using the provided multi-stage Dockerfile.

  1. Build the image:

    docker build -t chirpy .
  2. Run the container: The application requires environment variables defined in a .env file. Use the --env-file flag to pass them:

    docker run --env-file .env -p 8080:8080 chirpy

    Note: Ensure your DB_URL in .env points to a host reachable from within the container (e.g., using your machine's IP instead of localhost if the DB is running locally outside of Docker).

Certificate

HTTP Servers Certificate

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages