Skip to content

poschuler/pragmatic-nodejs-api

Repository files navigation

Disclaimer: This README.md file was generated by an LLM (Large Language Model).

Pragmatic Node.js API

A pragmatic foundation for building maintainable REST APIs with Node.js, Express, and TypeScript.

✨ Features

  • Scalable Architecture: A modular, feature-based structure that grows with your project.
  • TypeScript by Default: Enjoy the benefits of static typing for more robust and maintainable code.
  • Best Practices: Built-in best practices for configuration management, routing, and more.
  • Developer-Friendly: Comes with hot-reloading for a smooth development experience.
  • Linter & Formatter: Integrated with BiomeJS for clean and consistent code.
  • Ready to Deploy: Includes scripts for building and starting a production-ready server.

🏁 Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/poschuler/pragmatic-nodejs-api.git
  2. Navigate to the project directory:

    cd pragmatic-nodejs-api
  3. Install the dependencies:

    npm install

Running the Application

  • Development Mode: To start the server in development mode with hot-reloading, run:

    npm run dev

    The server will be available at http://localhost:3000.

  • Production Mode: To build and start the application in production mode, run:

    npm run start

📜 Available Scripts

  • npm run dev: Starts the application in development mode with hot-reloading.
  • npm run build: Compiles the TypeScript code to JavaScript in the dist directory.
  • npm run start: Builds and starts the production version of the application.
  • npm run biome:lint: Lints the codebase for errors.
  • npm run biome:lint:fix: Lints and fixes the codebase.
  • npm run biome:format: Formats the codebase.
  • npm run biome:format:fix: Formats and writes the changes to the codebase.

🏗️ Project Structure

The project follows a feature-oriented directory structure, making it easy to navigate and scale.

src/
├── app.ts               # Main application entry point
├── server.ts            # Core Server class (Express wrapper)
├── routes.ts            # Main application router
│
├── config/
│   └── config.ts        # Environment variable management
│
└── features/            # Example feature module
    └── products
        ├── products-controller.ts
        └── products-routes.ts

🛠️ Technology Stack

🤝 Contributing

Contributions are welcome! Please read our AGENTS.md for guidelines on how to collaborate with the project, especially when using AI agents.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A pragmatic foundation for building maintainable REST APIs with Node.js, Express, and TypeScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published