Skip to main content

Prerequisites

Before installing API Master, ensure you have the following installed on your system:
  • Node.js: Version 18.x or higher
  • npm: Version 8.x or higher (comes with Node.js)
  • Git: For cloning the repository
You can verify your Node.js and npm versions by running:
node --version
npm --version

Installation Methods

1

Clone the Repository

Clone the API Master repository to your local machine:
git clone <repository-url>
cd api-master
Or download the ZIP file and extract it to your desired location.
2

Install Dependencies

Install all required dependencies using your preferred package manager:
npm install
This will install the following core dependencies:
  • express (^4.18.2) - Web framework
  • cors (^2.8.5) - CORS middleware
  • multer (^1.4.5-lts.1) - File upload handling
And development dependencies:
  • typescript (^5.9.3) - TypeScript compiler
  • ts-node (^10.9.2) - TypeScript execution
  • nodemon (^3.0.1) - Development server
  • esbuild (^0.27.2) - Fast bundler
3

Create Required Directories

Create the uploads directory for storing uploaded files:
mkdir -p uploads
The uploads directory is automatically created when the first file is uploaded, but creating it manually ensures proper setup.
4

Verify Installation

Compile the TypeScript code and start the development server:
npm run dev
You should see:
Server running on port 3000
Test the API by visiting:
curl http://localhost:3000
Expected response:
{"message": "Welcome to API Master"}

Project Structure

After installation, your project structure should look like this:
api-master/
├── app.ts                 # Main application entry point
├── src/
│   ├── controllers/       # Request handlers
│   │   └── userController.ts
│   └── routes/           # API route definitions
│       └── userRoutes.ts
├── uploads/              # File upload directory
├── dist/                 # Compiled JavaScript output
├── package.json          # Project dependencies
├── tsconfig.json         # TypeScript configuration
└── web.config           # IIS deployment configuration
Key Files:
  • app.ts - Express server setup with CORS and middleware configuration
  • src/routes/userRoutes.ts - Multer configuration for file uploads
  • src/controllers/userController.ts - File upload logic and response handling

Next Steps

Now that you have installed API Master, you can:
  1. Configure your application - Set up environment variables and customize CORS settings
  2. Deploy to production - Learn how to build and deploy your API
  3. Explore the API - Start using the file upload endpoints

Build docs developers (and LLMs) love