Skip to content

This is a TypeScript Express server that integrates with ImageKit for handling image-related functionalities.

Notifications You must be signed in to change notification settings

scriptscrypt/imagekit-server-ts

Repository files navigation

TS Server with ImageKit Integration

This is a TypeScript Express server that integrates with ImageKit for handling image-related functionalities.

Getting Started

  1. Clone the repository:

    git clone https://github.com/scriptscrypt/imagekit-server-ts.git
    cd imagekit-server-ts
  2. Install dependencies:

    yarn install
  3. Create a .env file in the root of your project based on the .env.example file.

    cp .env.example .env

    Update the values in the .env file with your ImageKit credentials.

  4. Run the development server:

    yarn dev

    The server will start at http://localhost:3000.

Environment Variables

Make sure to set the following environment variables in your .env file:

  • IK_PUBLIC_KEY: Your ImageKit public key.
  • IK_PRIVATE_KEY: Your ImageKit private key.
  • IK_URL_ENDPOINT: Your ImageKit URL endpoint.

Example:

IK_PUBLIC_KEY=your-public-key
IK_PRIVATE_KEY=your-private-key
IK_URL_ENDPOINT=your-url-endpoint

API Routes Documentation

Get ImageKit Authentication Parameters

  • Route: /api/imagekit-auth
  • Method: GET
  • Description: Get authentication parameters from ImageKit.
  • Example Response:
    {
      "signature": "...",
      "expire": "..."
      // Other authentication parameters
    }

Contribution

Feel free to contribute to the project by opening issues or submitting pull requests. Contributions are welcomed!

License

This project is licensed under the MIT License.

About

This is a TypeScript Express server that integrates with ImageKit for handling image-related functionalities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published