A Node.js and Express-based API using TypeScript, MongoDB, and Mongoose for handling referrals.
✅ Create, update, delete, and retrieve referrals
✅ Uses Mongoose for database interactions
✅ Express.js for API routing
✅ TypeScript for type safety
✅ Cloudinary for image storage (if applicable)
✅ Dotenv for environment variables
git clone https://github.com/purefml/charmander.git
cd charmander
npm install
Create a .env
file in the root directory and add:
NODE_ENV = 'development'
MONGODB = 'mongodb+srv://delacruzrubenjames:[email protected]/?retryWrites=true&w=majority&appName=Charmander'
CLOUDINARY_CLOUD_NAME='dxkmfa8ea'
CLOUDINARY_API_KEY='531486551519759'
CLOUDINARY_API_SECRET='3lMHMHHAXEn3lC4pRpHCrhpttlQ'
npm start
npm run build
node dist/index.js
Method | Endpoint | Description |
---|---|---|
POST |
/api/referrals |
Add a new referral |
GET |
/api/referrals |
Get all referrals |
PUT |
/api/referrals/:id |
Update a referral by ID |
DELETE |
/api/referrals/:id |
Delete a referral by ID |
- Backend: Node.js, Express.js
- Database: MongoDB, Mongoose
- TypeScript: Type Safety
- Middleware: Body-parser, Multer
- Storage: Cloudinary (optional)
- Environment Variables: Dotenv
This project is licensed under the ISC License.
Let me know if you want any modifications! 🚀🔥