Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chirpy

Chirpy is a backend RESTful API built for a Boot.dev backend course. It provides the server-side functionality for a microblogging platform, including user authentication (using Argon2 and JWTs with refresh tokens), chirp (post) creation and retrieval with automated content filtering, user upgrades via webhook integration, and hit metrics tracking.

Technologies Used

  • Node.js & TypeScript
  • Express
  • PostgreSQL
  • Drizzle ORM & Drizzle Kit
  • Argon2 & JSON Web Tokens (JWT)
  • Vitest

Getting Started

Prerequisites

  • Node.js (v22.14.0 or later recommended)
  • npm
  • PostgreSQL

Installation

  1. Clone the repository:

    git clone https://github.com/wmwright89/Chirpy.git
    cd Chirpy
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env file in the root directory (or copy .env.example):

    cp .env.example .env

    Configure the required variables:

    DB_URL="postgres://postgres:<password>@localhost:5432/chirpy?sslmode=disable"
    PORT=8080
    PLATFORM="dev"
    SECRET="your-jwt-secret-key"
    POLKA_KEY="your-polka-api-key"
  4. Run database migrations:

    Make sure your PostgreSQL database exists, then run:

    npm run migrate

    (Note: The server also automatically applies pending migrations upon startup).

Running the Application

  • Development Mode (compiles TypeScript and starts the server):

    npm run dev
  • Production Mode (builds to dist and runs compiled JavaScript):

    npm run build
    npm start

By default, the server runs at http://localhost:8080.

Running Tests

To run the unit test suite:

npm test

About

Learn HTTP Servers Course work for Boot Dev Backend developer course

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages