Skip to content

EbrahimSolomon/deals-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deals App

A tiny Fastify + TypeScript API with a one-page UI, deployed on Amazon Linux (EC2) behind Nginx and managed with PM2.

Stack

  • Node 20, TypeScript, Fastify, Zod
  • Static UI served by Fastify
  • Nginx reverse proxy (port 80 → Node :3000)
  • PM2 for process management

Quick start (local)

pnpm install pnpm dev

Build & run (prod): pnpm build node dist/server.js

API

GET /health → { ok: true, ts }

GET /api/deals → list deals

POST /api/deals → create { title, description, price }

DELETE /api/deals/:id → remove deal

Deploy (EC2)

Nginx → 127.0.0.1:3000

PM2: pm2 start dist/server.js --name deals-api && pm2 save

Update: git pull && pnpm i --prod=false && pnpm build && pm2 restart deals-api

About

Practice “Deals” app - Fastify + TypeScript API + one-page UI, EC2 + Nginx + PM2, Zod validation, rate-limit, health/metrics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors