This project is built using NestJS, a progressive Node.js framework for building efficient and scalable server-side applications. It utilizes SQL as its database, providing robust data storage and retrieval capabilities.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js (v20.11.0)
- npm (v10.2.4)
- A SQL database - MySQL
- Git (for cloning the repository)
- Clone the repository
git clone https://github.com/kumaraguru16/eg-backend.git
cd eg-backend
- Install dependencies
npm install
-
Configure your environment
Create a .env file in root folder.
Example for environment file.
DB_HOST=localhost
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=12345678
DB_DATABASE=magazine
JWT_SECRET_KEY=71a817a9-13c6-4a71-91d7-6ef2ad3631a3
JWT_EXPIRATION_TIME=1d
-
Database setup
Ensure your SQL database is running and accessible with below configuration.
MYSQL download from below link - https://www.mysql.com/downloads/
Workbench download from below link: - https://dev.mysql.com/downloads/workbench/
Host Name = localhost
Port = 3306
Username = root
Password = 12345678
Database Name = magazine
- Development mode
npm run start:dev
- Production mode
npm run start:prod
This will start the application on http://localhost:3000
by default. You can access the API endpoints as defined in your project's controllers.
Swagger UI:
Navigate to http://localhost:3000/api to view the API documentation.
- NestJS - The framework used
- Node.js - The runtime environment
- SQL Database (e.g., PostgreSQL, MySQL) - Data persistence
- Kumaraguru - kumaraguru16
This project is licensed under the MIT License.