Skip to content

sanchezd90/iandai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IANDAI - Backend API Service

Overview

IANDAI is a backend service that serves as an API, connecting to a MongoDB database and the ChatGPT API. It provides data to a Next.js frontend. This README provides information on setting up and using the IANDAI backend service.

Installation

Make sure you have Node.js installed on your machine.

  1. Clone the repository:
git clone <repository-url>
  1. Navigate to the project directory:
cd iandai
  1. Install dependencies:
npm install

Configuration

Environment Variables

Create a .env file in the project root and configure the following variables:

# MongoDB Connection String
MONGO_URI=your-mongodb-connection-string

# ChatGPT API Key
OPENAI_API_KEY=your-chatgpt-api-key

# Port for the server
PORT=3000

Project Structure

  • app.js: Entry point for the application.
  • controllers/: Contains controllers handling business logic.
  • routes/: Defines API routes.
  • config/: Configuration files (e.g., database connection).
  • models/: MongoDB schema models.
  • utils/: Utility functions.

Usage

To start the server, run the following command:

npm start

The server will start at the specified port in the .env file (default is 3000).

Releases

No releases published

Packages

No packages published