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.
- Host: GitHub
- URL: https://github.com/scriptscrypt/imagekit-server-ts
- Owner: scriptscrypt
- Created: 2024-01-29T08:38:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T12:20:40.000Z (over 1 year ago)
- Last Synced: 2025-02-09T20:41:18.108Z (12 months ago)
- Language: TypeScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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).