This project is a proof of concept for using a GitHub repository as an image hosting service. The API allows users to upload, list, and delete image files from the repository, providing an easy interface to manage files hosted on GitHub.
Github : MasFana/Github-Image-Bucket-API
To set up and run this project, you need Node.js and npm installed on your system.
Clone the repository:
git clone https://github.com/MasFana/Github-Image-Bucket-API cd Github-Image-Bucket-API
Install dependencies:
npm install
Set up environment variables by creating a .env file in the root directory with the following values:
GITHUB_TOKEN=<your_github_token> GITHUB_REPO=<your_github_repo> GITHUB_BRANCH=<your_github_branch>
Start the server:
npm start
The server will run on http://localhost:3000.
The API requires the following environment variables to be set:
The above is the detailed content of Github Image Hosting API with UI. For more information, please follow other related articles on the PHP Chinese website!