This is the repository of the YourPet Backend API project, which provides an API to interact with the YourPet application. It provides a solution for managing data resources in a web application with support for basic CRUD functions using GET, POST, PATCH and DELETE methods.
This project implements the server part of the YourPet application. It is built on Node.js, using the Express.js framework to implement the API and Mongoose to interact with the MongoDB database.
Before starting work with the project, make sure that the following tools are installed on your computer:
- Node.js (version 12 or higher)
YourPet Backend API is built using the following tools:
To install YourPet Backend API, follow these steps:
- Open a terminal and clone the YourPet Backend API repository to your local machine using
git clone https://github.com/Mariya-Lutsenko/YourPet-backend.git
. - Navigate to the project directory using
cd YourPet-backend
. - Install dependencies using
npm install
.
- Create an
.env
file in the root of the project. - Specify the necessary environment variables in this file.
npm start
— server start in production modenpm run start:dev
— start the server in development modenpm run lint
— run a code check run with eslint, must run before each PR and fix all linter errorsnpm lint:fix
— the same linter check, but with automatic fixes for simple errors