Skip to content

EchoRag/echo_be

Repository files navigation

Echo Backend Service

Known Vulnerabilities

codecov

A Node.js + TypeScript + Express backend service with PostgreSQL, Clerk authentication, and Swagger documentation.

Prerequisites

  • Node.js (v14 or higher)
  • PostgreSQL
  • Clerk account for authentication

Setup

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Create a .env file based on .env.example:
    cp .env.example .env
  4. Update the .env file with your configuration:
    • Set up your PostgreSQL database credentials
    • Add your Clerk API keys
    • Configure other environment variables as needed

Development

Start the development server:

npm run dev

The server will start on http://localhost:3000 (or the port specified in your .env file).

API Documentation

Access the Swagger documentation at:

http://localhost:3000/api-docs

Testing

Run tests:

npm test

Run tests in watch mode:

npm run test:watch

Generate test coverage report:

npm run test:coverage

Production

Build the application:

npm run build

Start the production server:

npm start

Project Structure

src/
├── config/         # Configuration files
├── controllers/    # Route controllers
├── middlewares/    # Express middlewares
├── models/         # Database models
├── routes/         # API routes
├── services/       # Business logic
├── utils/          # Utility functions
└── test/           # Test files

Features

  • TypeScript support
  • PostgreSQL with TypeORM
  • Clerk authentication
  • Swagger API documentation
  • Rate limiting
  • Error handling
  • Security headers (Helmet)
  • CORS support
  • Request logging (Morgan)
  • Jest testing setup

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages