This project is built using NestJS, a progressive Node.js framework for building efficient and scalable server-side applications. It uses MongoDB as the database, with MongoDB Compass as the GUI for database management.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Before you begin, ensure you have the following installed on your system:
- Node.js (LTS version)
- npm (Node Package Manager), which comes with Node.js
- MongoDB
- MongoDB Compass (optional, for easier database management)
-
Download and install Node.js from the official website.
-
npm is included with Node.js installation. To verify their installation, run the following commands in your terminal:
node --version npm --version
- Install MongoDB: Follow the official MongoDB installation guide for your operating system.
- Start MongoDB:
- On macOS/Linux: MongoDB is typically started as a background service. You can initiate it with the
mongod
command. - On Windows: MongoDB installs as a service and should start automatically. If not, manually start it through the Services management console.
- On macOS/Linux: MongoDB is typically started as a background service. You can initiate it with the
- Verify MongoDB Installation: Open a terminal or command prompt and type
mongo
to connect to the database server using the MongoDB shell. If connected, MongoDB is running correctly.
MongoDB Compass is the official GUI for MongoDB, facilitating database management tasks. Download and install Compass from the MongoDB Compass page.
Follow these steps to get your development environment running:
-
Clone the Repository
git clone <repository-url>
-
Navigate to the Project Directory
cd <project-directory-name>
-
Install Dependencies
npm install
-
Environment Configuration
Create a
.env
file in the project root and specify your MongoDB URI and other configurations:MONGODB_URI=mongodb://localhost:27017/yourDatabaseName
PORT=8080
-
Start the Application
npm run start
For development with hot reload:
npm run start:dev
-
Accessing the Application
The application will be available at
http://localhost:8080
or another port if you specified one differently in your.env
file.
With MongoDB Compass installed, connect to your MongoDB database using the URI provided in your .env
file. Compass offers a user-friendly interface to manage your databases, collections, and documents, and perform various database operations.