Welcome to the backend service for the Refer & Earn application! This service handles user referrals and notifications using a robust stack of modern technologies.
- TypeScript - For type-safe JavaScript
- Node.js - Runtime environment
- Express - Web framework
- MySQL2 - Database driver
- Prisma ORM - Database ORM
- Nodemailer - For sending emails
- Mailgen - For generating email templates
- Nodemon - For automatic server restarts
- Dotenv - For managing environment variables
-
Clone the repository
git clone https://github.com/Chandan8018/AccredianBackend.git cd AccredianBackend
-
Backend Setup
npm install
-
Environment Variables
- Create a
.env
file in the root directory and add your MySQL URI, EMAIL, and other necessary environment variables.
- Create a
-
.env
DATABASE_URL="mysql://userName:password@localhost:3306/refer_and_earn" EMAIL="[email protected]" PASSWORD="zhdwrvnm*****" PORT=1234
-
Run Prisma migrations
npx prisma migrate dev
-
Start the server
npm run dev
.
โโโ src
โ โโโ controllers
โ โโโ middleware
โ โโโ models
โ โโโ routes
โ โโโ services
โ โโโ utils
โโโ prisma
โ โโโ schema.prisma
โโโ .env
โโโ package.json
โโโ tsconfig.json
For any questions or inquiries, please contact:
- Author: Chandan Kumar Sahoo
- Email: [email protected]
- GitHub: https://github.com/Chandan8018/
Feel free to reach out for any questions, suggestions, or contributions. Happy coding!