Skip to content

Mind money`s API prowered by Node Js, Typescript, express, Prisma, MongoDB, JWT

Notifications You must be signed in to change notification settings

anythinglord/mind-money-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js API with TypeScript, Express, and MongoDB

Overview

This is a RESTful API built using Node.js, TypeScript, Express, and MongoDB. It follows best practices for clean code, scalability, and maintainability.

Features

  • TypeScript for static typing and improved maintainability
  • Express.js for handling HTTP requests
  • MongoDB with Mongoose for database management
  • Environment variable management using dotenv
  • API request validation with Joi
  • Centralized error handling and logging
  • CRUD operations for a sample resource

Prerequisites

Ensure you have the following installed:

  • Node.js (v16+ recommended)
  • MongoDB

Installation

  1. Clone the repository:
  2. Install dependencies:
  3. Create a .env file in the root directory and define the following environment variables:
  4. Start the development server:

Project Structure

Available Scripts

  • npm run dev - Starts the development server with nodemon
  • npm run build - Compiles TypeScript into JavaScript
  • npm start - Runs the production build

API Endpoints

Health Check

  • GET /api/health
  • Response:

Users (Sample Resource)

  • GET /api/users - Fetch all users
  • POST /api/users - Create a new user
  • GET /api/users/:id - Get a specific user by ID
  • PUT /api/users/:id - Update user information
  • DELETE /api/users/:id - Delete a user

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

Contact

For inquiries, reach out at email@example.com.

About

Mind money`s API prowered by Node Js, Typescript, express, Prisma, MongoDB, JWT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published