Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 nodejs postgresql web-server
Last synced: about 1 month 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 (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T07:43:23.000Z (4 months ago)
- Last Synced: 2024-08-29T08:27:48.082Z (4 months ago)
- Topics: database, expressjs, joi, nodejs, postgresql, web-server
- Language: JavaScript
- Homepage:
- Size: 223 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
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.