This is the official repository for the Node.js backend of our application. Follow the instructions below to set up and run the project.
Before you begin, ensure you have the following installed on your system:
- Node.js (LTS version recommended): Download Node.js
- npm (Comes with Node.js): Verify installation with:
node -v npm -v
Clone the repository to your local machine and navigate to the project directory:
git clone https://github.com/DoMakina/backend.git
cd backend
Install all required dependencies using npm:
npm install
Create a .env
file in the root directory to store environment-specific variables. Use the provided .env.sample
file as a reference:
cp .env.sample .env
Edit the .env
file to include your configuration values, such as PORT
, database credentials, or API keys.
The following npm scripts are available for use:
-
Start the Application:
npm start
Runs the application in production mode using
node src/index.js
. -
Run in Development Mode:
npm run dev
Starts the application with
nodemon
, enabling live reloads whenever code changes.
Below is the structure of the project for easier navigation:
.
├── src
│ ├── index.js # Application entry point
│ ├── routes/ # Define API routes
│ ├── controllers/ # Controller logic
│ ├── models/ # Database models
| ├── services/ # Business logic
│ ├── middlewares/ # Middleware logic
│ ├── utils/ # Utility functions
│ └── config/ # Configuration files
├── .env # Environment variable file
├── package.json # Project metadata and dependencies
└── README.md # Documentation
This project is licensed under the MIT License.
If you have questions or suggestions, please open an issue or contact the maintainer.
Happy coding! 🚀