https://github.com/oleksandr-romashko/goit-node-rest-api
REST API application for managing your contacts
https://github.com/oleksandr-romashko/goit-node-rest-api
database expressjs joi multer nodejs postgresql web-server
Last synced: 3 months ago
JSON representation
REST API application for managing your contacts
- Host: GitHub
- URL: https://github.com/oleksandr-romashko/goit-node-rest-api
- Owner: oleksandr-romashko
- Created: 2024-08-22T19:50:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-02T10:26:30.000Z (almost 2 years ago)
- Last Synced: 2026-01-03T16:32:42.239Z (6 months ago)
- Topics: database, expressjs, joi, multer, nodejs, postgresql, web-server
- Language: JavaScript
- Homepage:
- Size: 842 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contacts management application
#### goit-node-rest-api
REST API application for managing your contacts.
## Project description
Store and manage your contacts using a REST API.
* Supports the following routes:
* `GET /api/contacts` - Returns an array of all contacts.
* `GET /api/contacts/` - Returns the contact object by `id` or a JSON response in the format `{"message": "Not found"}` with a `404` status if the contact by id is not found.
* `DELETE /api/contacts/` - Deletes the contact by `id`. Returns the object of the found and deleted contact in JSON format. If the contact by id is not found, returns a JSON response in the format `{"message": "Not found"}` with a `404` status.
* `POST /api/contacts` - Returns the newly created contact object with fields `{id, name, email, phone}`.
* `PUT /api/contacts/` - Returns the updated contact object. If the contact by `id` is not found, returns a JSON response in the format `{"message": "Not found"}` with a `404` status.
## Quickstart
1) Download the files from the [repository](https://github.com/oleksandr-romashko/goit-node-rest-api).
2) Make sure you have the [latest Node.js LTS version](https://nodejs.org/en/download/package-manager) installed on your machine.
3) Install the application dependencies using the `npm install` command in your terminal.
## Usage
To start the web-server use `npm start` (for production) or `npm run dev` (for development with daemon) command in your terminal.
[Postman](https://www.postman.com/) application may be used to work and test REST API.