Skip to content

krishmakhijani/fast-api-search

Repository files navigation

Project Name

Project Description

This project is built using Next.js and includes Redis and Postgres and Hono Cloudflare for data management.

Why Needed

Compare

Architecture

Redis Architecture

Redis Architecture

Postgres Architecture

Postgres Architecture

Environment Setup

Prerequisites

  • Node.js
  • Docker
  • Redis
  • Postgres

Installation

  1. Clone the repository:

    git clone https://github.com/your-repo.git
    cd your-repo
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the root directory and add the following variables:

    # .env
    DATABASE_URL=postgres://user:password@localhost:5432/database
    UPSTASH_REDIS_REST_URL=""
    UPSTASH_REDIS_REST_TOKEN=""
  4. Start the development server:

    npm run dev

API Documentation

Endpoints

GET /api/v1/resource

Fetches a list of resources.

Request:

{
"data": "sample data"
}

POST /api/v1/resource

Creates a new resource.

Request:

POST /api/v1/resource HTTP/1.1
Host: your-api-host
Content-Type: application/json
{
"key": "value"
}

Response:

{
"message": "Resource created successfully"
}

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

A server for countries built using Hono and Upstash Redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages