This README provides essential information about setting up and configuring the Node.js backend for your project. Before running the application, ensure you have Node.js and npm installed on your machine.
- config/: Stores configuration files and environment-specific settings.
- controllers/: Handles incoming requests, routes them to appropriate services.
- middlewares/: Contains reusable middleware functions for authentication, error handling, logging, and other common tasks.
- models/: Holds Mongoose models (if using MongoDB) representing data entities in the application.
- routes/: Defines route handlers that map URLs to controller functions.
- services/: Encapsulates business logic and utility functions, keeping controllers focused on request handling.
- utils/: Stores common utility functions used throughout the application.
- README.md: Documentation for the GitHub repository.
- app.js: Entry point for the application, usually initializing Express or other frameworks.
Pranav is our visionary leader, driving the team with passion and expertise in React Native development. With a knack for solving complex problems, Pranav ensures that our project maintains a high standard of quality and innovation.
Vaidehi is a creative force on our team, specializing in designing intuitive and visually appealing user interfaces. Her attention to detail and commitment to user experience make her an invaluable member of our development crew.
Sayali is our coding maestro, bringing a wealth of technical expertise to the project. With a keen eye for optimization and performance, Sayali ensures that our React Native app runs smoothly and efficiently.
Follow these steps to clone the repository and set up the project:
- Clone the Repository:
git clone https://github.com/sanketshirsath226/Biomass_Management_Backend.git
- Navigate to the Project Directory:
cd Biomass_Management_Backend
- Install Dependencies:
npm install
- Create a
config
directory in the root of the project. - Inside the
config
directory, create a file namedconfig.example.env
with the following parameters:# config.example.env # Gmail credentials for sending emails GMAIL_ID= GMAIL_PASS= # Port on which the server will run PORT= # MongoDB connection URI MONGO_URI= # JWT secret key for token generation and verification JWT_SECRET= # JWT expiration time in seconds JWT_EXPIRE= # Cookie expiration time in milliseconds COOKIE_EXPIRE=
- Duplicate the
config.example.env
file and rename it toconfig.env
. Update the values for each parameter according to your configuration.
- Start the server:
By default, the server will run on the specified port in the config.env file.
npm start
- Access the application at
http://localhost:{PORT}
in your browser.
-
Ensure that you never commit your config.env file to version control. Add it to your .gitignore file to prevent accidental commits.
-
Keep your sensitive information, such as API keys and passwords, secure and do not share them publicly.
-
Review the codebase and make necessary adjustments based on your project's requirements.
Feel free to reach out if you have any questions or issues. Happy coding!