A Node.js REST API service that provides search functionality for Java and Spring-related learning resources using Supabase as the backend database.
- Full-text search across Java resources
- Category-based filtering
- RESTful API endpoints
- Supabase integration for data storage
- CORS enabled for cross-origin requests
GET /api/search
Query Parameters:
query
: Search term for full-text search across titles and descriptionscategory
: Filter results by specific category
Example:
GET /api/search?query=spring&category=Spring Web
GET /api/categories
Returns a list of all unique categories available in the database.
GET /
Simple endpoint to verify API is running.
The application uses a java_resources
table with the following structure:
id
: UUID (Primary Key)title
: Text (Required)description
: Textcategory
: Text (Required)tags
: Text Arraycreated_at
: Timestampupdated_at
: Timestamp
- Framework: Express.js
- Database: Supabase (PostgreSQL)
- Features:
- Full-text search using PostgreSQL's text search capabilities
- Row Level Security (RLS) enabled
- Public read access
- CORS enabled for development
Required environment variables in .env
:
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
PORT=3000 (optional, defaults to 3000)
- Install dependencies:
npm install
- Start development server:
npm run dev
- Start production server:
npm start
The server will start on port 3000 (or the port specified in your environment variables).