A contacts application using postgreSQL, knex, express, node.
Make sure you have the main dependencies:
Clone this repository:
$ git clone https://github.com/falcaoaugustos/contacts-pen.git
Install all dependencies:
$ cd contacts-pen
$ npm install
$ node server/index.js <USER> <PASSWORD> <DATABASE>
If everything from the Getting Started section goes well, you should have this:
|-- server/
| |-- controllers/
| |-- models/
| |-- routes/
| |-- db-config.js
| |-- index.js
|-- .gitignore
|-- package.json
|-- [...]
Calling any API endpoint without a resource ID will return a paginated list of available resources for that API.
The standard contact informations witch the user want to save.
GET contacts/{id}
{
"id": 3,
"first_name": "Abel",
"last_name": "Rose",
"email": "rose@domain.com",
"phone": "1111-2222",
"country": "Brazil"
}
Key | Value Data Type |
---|---|
id | number |
first_name | string |
last_name | string |
string | |
phone | string |
country | string |
Contributions are very welcome! If you'd like to contribute, feel free to send a pull request!
contacts-pen is released under an MIT license. See LICENSE file for more information.