This is a production-ready Express.js API server with optimized security, performance, and structured routing for handling social media, job search, and influencer search requests.
Features
✅ Security Enhancements (Helmet, CORS, Rate Limiting)
✅ Performance Boost (Compression enabled)
✅ Structured Routing (Modular route handling)
✅ Logging (Morgan for request logging)
✅ Global Error Handling
Installation
-
Clone the repository
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and set the required environment variables:PORT=5300
-
Start the server:
npm run dev
API Routes
Social Media Routes
/social/instagram
/social/facebook
/social/youtube
/social/tiktok
/social/x
Job Search Routes
/jobs/linkedin
/jobs/glassdoor
/jobs/apollo
/jobs/crunchbase
/jobs/indeed
Other Routes
/influencerSearch
- Search influencers/maps
- Retrieve map-related data/db
- Database interactions
Middleware
- CORS: Enables cross-origin requests
- Helmet: Secures HTTP headers
- Compression: Gzip compression for response optimization
- Rate Limiting: Prevents abuse (100 requests per 15 min per IP)
- Morgan: Logs HTTP requests in
combined
format