An open API service indexing awesome lists of open source software.

https://github.com/scriptscrypt/imagekit-server-ts

This is a TypeScript Express server that integrates with ImageKit for handling image-related functionalities.
https://github.com/scriptscrypt/imagekit-server-ts

Last synced: 10 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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:

```bash
git clone https://github.com/scriptscrypt/imagekit-server-ts.git
cd imagekit-server-ts
```

2. Install dependencies:

```bash
yarn install
```

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

```bash
cp .env.example .env
```

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

4. Run the development server:

```bash
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:

```dotenv
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:**
```json
{
"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](LICENSE).