npm installnpm run devThe server will start on http://localhost:3000
curl http://localhost:3000/api/v1/healthcurl -X POST http://localhost:3000/api/v1/scan/url \
-H "Content-Type: application/json" \
-d '{"url": "https://www.google.com"}'curl -X POST http://localhost:3000/api/v1/scan/domain \
-H "Content-Type: application/json" \
-d '{"domain": "google.com"}'curl -X POST http://localhost:3000/api/v1/check/password \
-H "Content-Type: application/json" \
-d '{"password": "MySecureP@ss123!"}'curl -X POST http://localhost:3000/api/v1/check/email-breach \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com"}'# Development
npm run dev # Start with hot reload
# Building
npm run build # Compile TypeScript
# Running
npm start # Run compiled JavaScript
# Testing
npm test # Run all tests
npm run test:watch # Run tests in watch mode
# Code Quality
npm run lint # Check for linting errors
npm run lint:fix # Fix linting errors
npm run format # Format code with Prettiersrc/
├── index.ts # Server entry point
├── app.ts # Express app setup
├── config/ # Configuration
├── middleware/ # Express middleware
├── routes/ # API endpoints
├── services/ # Business logic
├── types/ # TypeScript types
└── utils/ # Helper functions
tests/
├── setup.ts # Test configuration
├── urlScanner.test.ts # URL tests
└── password.test.ts # Password tests
- ✅ Install dependencies:
npm install - ✅ Start server:
npm run dev - ✅ Test endpoints with curl or Postman
- ✅ Read README.md for detailed documentation
- ✅ Check Environment Variables
Create a .env file (copy from .env.example):
PORT=3000 # Server port
NODE_ENV=development # Environment
RATE_LIMIT_WINDOW_MS=900000 # Rate limit window in ms
RATE_LIMIT_MAX_REQUESTS=100 # Max requests per window
HIBP_API_KEY= # Optional: HaveIBeenPwned API key
LOG_LEVEL=info # Logging levelnpm run build
npm startnpm i -g vercel
vercelnpm i -g @railway/cli
railway upnpm run build
docker build -t security-intel-api .
docker run -p 3000:3000 security-intel-api# Change PORT in .env to another port (e.g., 3001)
PORT=3001# Reinstall dependencies
rm -rf node_modules
npm install# Clear build cache and rebuild
npm run buildUse this interactive Postman collection URL:
- Import this collection into Postman for easy testing
Or use curl:
# URL Scanner
curl -X POST http://localhost:3000/api/v1/scan/url \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
# Password Check
curl -X POST http://localhost:3000/api/v1/check/password \
-H "Content-Type: application/json" \
-d '{"password": "Test@1234"}'- 📖 Full API docs: See README.md
- 🐛 Issues: Check logs in
logs/directory - 📝 Code comments: All functions have JSDoc comments
✅ Full TypeScript implementation ✅ Express.js with middleware ✅ Zod validation ✅ Winston logging ✅ Rate limiting ✅ Error handling ✅ Security headers ✅ CORS support ✅ Jest tests ✅ ESLint & Prettier ✅ Production-ready code ✅ Comprehensive documentation
Happy secure coding! 🚀