This is a Backend Service.

Made with love.

# URL Description
1 /api/ Hola mundo!
2 /api/github/getCommits/:word Searches recent commits on GitHub (main public repos) that contain the given "word."
3 /api/github/getCommitsByRepoAndOwner/khanos/khanos.backend Searches recent commits on GitHub by a given owner and repo name.
4 /api/openai/getResponse/:text Just ask anything to the OpenAI
5 /api/openai/getImage/:text Generate images using OpenAI
6 /api/gemini/getFromText?prompt=Hi, how are you? Generate text from text-only inputs
7 /api/gemini/getChatFromText/:prompt Generate text from text-only inputs and create a context
8 /api/gemini/getFromImage (POST)

Generate text from image and text inputs (multimodal)

curl --location 'http://localhost:3030/api/gemini/getFromImage' \ --header 'Accept: application/my-aweson-app"' \ --form 'prompt="What do you see"' \ --form 'image=@"my-image.webp"'

9 /api/url Fetch all the URLs from the database
10 /api/url/create (Post)

Create a new short URL.

curl --location 'http://localhost:3030/api/url/create' \ --header 'Accept: application/vnd.github.cloak-preview"' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'original_url=https://www.epilef.org'
11 /api/url/delete/:SHORT_URL (Delete)

Delete a short URL.

curl --location --request DELETE 'http://localhost:3030/api/url/delete/2469' \ --header 'Accept: application/vnd.github.cloak-preview"'
12 /api/url/:SHORT_URL Get a stored url

khanos.backend 😍

This is a Node.js application that serves as the backend for the Khanos project. It includes a set of APIs and middlewares to handle requests and responses.

Check it out: https://khanos-backend.herokuapp.com

Getting Started

To get started with the project, clone the repository and install the dependencies:

git clone https://github.com/yourusername/khanos.backend.git
cd khanos.backend
npm install

Running the Application

To start the application, use the following command:

npm start

The application will start and listen on port 3000.

Devlop

To start the application in development mode, use the following command:

npm run dev

The application will start and listen for changes to handle hotreload, also loggin should be available.

Testing

To run the tests and code coverage run the following command:

npm run test

To run the tests and watch for changes on the files, run the following command:

npm run test:watch

Project Structure

The project has the following structure:

Controllers

Services

Middlewares

Models

License

This project is licensed under the terms of the MIT license.

This is a small fun project, you can view it on GitHub