From 1879517eae8b8b0614f7e045ad44ca9f9aee7f48 Mon Sep 17 00:00:00 2001 From: ananyak19 Date: Sun, 18 Jan 2026 18:05:57 +0530 Subject: [PATCH] added gitignore --- .env.example | 2 ++ .gitignore | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 README.md diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..86700e7 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +PORT=8080 +DATABASE_URL=postgresql://username:password@localhost:5432/database_name diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ca00cee --- /dev/null +++ b/.gitignore @@ -0,0 +1,65 @@ +# Dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +package-lock.json + +# Environment variables +.env +.env.local +.env.*.local +.env.development +.env.production +.env.test + +# Logs +logs/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +# Runtime data +pids/ +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage/ +*.lcov +.nyc_output/ + +# Build output +dist/ +build/ +out/ + +# IDE and Editor files +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store + +# OS files +Thumbs.db +Desktop.ini + +# Testing +.jest/ +test-results/ + +# Temporary files +tmp/ +temp/ +*.tmp + +# Database +*.sqlite +*.sqlite3 +*.db diff --git a/README.md b/README.md new file mode 100644 index 0000000..a432b47 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# 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: +```bash +npm install +``` + +2. Create a `.env` file based on `.env.example`: +```bash +cp .env.example .env +``` + +3. 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): +```bash +npm run dev +``` + +### Production mode: +```bash +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