|
|
||
|---|---|---|
| node_modules | ||
| src | ||
| .env | ||
| .env.example | ||
| .gitignore | ||
| README.md | ||
| package-lock.json | ||
| package.json | ||
README.md
SSAP Backend
Node.js/Express backend for SSAP application with PostgreSQL database.
Prerequisites
- Node.js (v14 or higher)
- PostgreSQL database
- npm or yarn
Setup
- Install dependencies:
npm install
- Create a
.envfile based on.env.example:
cp .env.example .env
- Update the
.envfile 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