Skip to content

yurisldk/node-express-realworld-example-app

 
 

Repository files navigation

RealWorld Backend — Node/Express/Prisma

Node/Express/Prisma Example App

Description

A full-featured backend implementation of the RealWorld API specification using Node.js (Express), Prisma ORM, and PostgreSQL. Supports CRUD, authentication, tests, migrations, and Docker deployment. Serves as the backend for realworld-react-fsd.

Technologies

  • Node.js, Express
  • TypeScript
  • Prisma ORM
  • PostgreSQL
  • Nx (monorepo)
  • Jest (unit/e2e tests)
  • Docker, Docker Compose
  • Makefile

Directory Structure

  • src/app/routes/ — main routes (article, auth, profile, tag)
  • src/prisma/ — Prisma schema, migrations, client
  • src/tests/ — unit tests for services
  • e2e/ — e2e tests (Jest)
  • ops/deploy/ — Dockerfile, docker-compose, deployment scripts
  • assets/ — static files

Environment Variables (.env)

DATABASE_URL=postgresql://myuser:mypassword@localhost:30432/mydb
JWT_SECRET=theSecretForCreatingTheJWT
NODE_ENV=development
PORT=3000
MIN_REQUEST_DELAY_MS=250
MAX_REQUEST_DELAY_MS=500
TEST_UTILS_TOKEN=foo.bar.baz

Quick Start (Local)

yarn install
# Start PostgreSQL (locally or via Docker)
yarn migrate         # apply Prisma migrations
yarn db:seed         # seed test data (optional)
yarn dev             # start the server

Docker Compose (Full Stack)

docker-compose -f ops/deploy/demo/docker-compose.yml --env-file ops/deploy/demo/.env up --build -d

Links & Contacts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • TypeScript 96.3%
  • Dockerfile 2.4%
  • Shell 1.1%
  • JavaScript 0.2%