/hg-backend

Unified Backend Service

Primary LanguageJavaScript

dt_hgqbe – Elegant RESTful API in Node.js + TypeScript

Less noise. More craft.
A minimal, clean, and modern backend starter using Express, TypeScript, and Prisma ORM, built to scale from prototypes to production.


Tech Stack

  • Node.js + Express
  • TypeScript
  • Prisma ORM + MySQL
  • RESTful API structure
  • Built-in support for testing & scalable architecture

Table of Contents


Usage

1. Clone the Repository

git clone git@github.com:hgq287/dt-node-hgqbe.git
cd dt-node-hgqbe

2. Install Dependencies

npm install

Database Setup

Make sure you have MySQL running. Then run:

npx prisma migrate dev --name init

Start the App

npm run build
npm run prod

Or during development:

npm run dev

Deployment via Docker

This section describes how to build, start, and manage the application's Docker containers.

Build and Start Containers

Run the following command to build the images (if needed) and start all services in detached mode:

docker compose -f docker-compose.yml up --build -d

Check Container Status

To verify the container's state:

docker ps -a

This will list all containers, including those that have exited.

Start Services (if already built)

If the containers have already been created (from a previous build), simply start them again with:

docker start $(docker ps -aq)

Stop All Running Containers

To stop all currently running containers:

docker stop $(docker ps -q)

License

This project is licensed under the MIT License.

© 2025 Hg Q.

MIT License – You are free to use, modify, and distribute this project with attribution.