Skip to content

Commit 90cd7bc

Browse files
committed
Create README.md
1 parent 7298e85 commit 90cd7bc

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Node.js Express Dogs API
2+
3+
This is a simple Node.js Express application that provides CRUD (Create, Read, Update, Delete) operations for managing dogs. It uses an in-memory array to store dog data. Each dog object includes properties such as `name`, `breed`, `age`, and `favoriteToy`.
4+
5+
## Getting Started
6+
7+
These instructions will help you get the project up and running on your local machine for development and testing purposes.
8+
9+
### Prerequisites
10+
11+
What things you need to install the software and how to install them:
12+
13+
- Node.js
14+
- npm (Node Package Manager)
15+
16+
### Installing
17+
18+
A step-by-step series of examples that tell you how to get a development environment running:
19+
20+
1. **Clone the repository:**
21+
```
22+
git clone [repository_url]
23+
```
24+
25+
2. **Navigate to the project directory:**
26+
```
27+
cd [project_name]
28+
```
29+
30+
3. **Install dependencies:**
31+
```
32+
npm install
33+
```
34+
35+
### Running the Application
36+
Run the application with the following command:
37+
```
38+
npm start
39+
```
40+
The server will start and listen for requests on http://localhost:3000.
41+
42+
### Endpoints
43+
The application supports the following endpoints:
44+
45+
- `GET /dogs`: Fetch all dogs.
46+
- `GET /dogs/:id`: Fetch a single dog by ID.
47+
- `POST /dogs`: Add a new dog.
48+
- `PUT /dogs/:id`: Update an existing dog by ID.
49+
- `DELETE /dogs/:id`: Delete a dog by ID.
50+
51+
### Running Tests
52+
To run the automated tests for this system, use the following command:
53+
```
54+
npm test
55+
```
56+
57+
### Built With
58+
- Node.js - The JavaScript runtime
59+
- Express - The web framework
60+
- Jest - The testing framework
61+
- Supertest - The library for testing HTTP

0 commit comments

Comments
 (0)