ssap_api/README.md

1.2 KiB

SSAP Backend

Node.js/Express backend for SSAP application with PostgreSQL database.

Prerequisites

  • Node.js (v14 or higher)
  • PostgreSQL database
  • npm or yarn

Setup

  1. Install dependencies:
npm install
  1. Create a .env file based on .env.example:
cp .env.example .env
  1. Update the .env file with your database credentials:
PORT=8080
DATABASE_URL=postgresql://username:password@localhost:5432/database_name

Running the Application

Development mode (with auto-reload):

npm run dev

Production mode:

npm start

The server will start on the port specified in your .env file (default: 8080).

Project Structure

backend/
├── src/           # Source code
├── .env           # Environment variables (not committed)
├── .env.example   # Environment variables template
├── package.json   # Project dependencies
└── README.md      # This file

Technologies

  • Express.js - Web framework
  • PostgreSQL - Database
  • dotenv - Environment variable management
  • CORS - Cross-origin resource sharing
  • express-rate-limit - API rate limiting