Skip to content

meysam/phone-book-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Springboot Phonebook API

Requirements

For building and running the application you need:

  • JDK 11
  • Maven 3
  • Common Library
    • Before using phonebook api you should compile and add this project. You can use this command: mvn clean install.

Running the application locally

There are several ways to run a Spring Boot application on your local machine. One way is to execute the main method in the digital.paisley.phonebook.Application class from your IDE.

Alternatively you can use the Spring Boot Maven plugin like so:

mvn spring-boot:run

Running the application in a docker container

The easiest way to run the application in a docker container is to use the Docker CLI:

  1. Go to the folder containing Dockerfile
cd project
  1. sudo docker build -t name:tag .
sudo docker build -t phonebook:1.0 .
  1. Start the docker container phonebook:1.0, run the /opt/app/app.jar file during startup.
sudo docker run -d -p 8080:8080 -t phonebook:1.0
  1. use this URL http://localhost:8080/

OpenAPI

After running thr App you can use this URL to find OpenAPI specification for the REST APIs

Document

You can find here all documents related to this project: Notion Documents

Also, you can find Tech Spec here: Tech Spec

Sample Request

  • Add new contact:
curl -X POST "https://api-dev.paisley.digital/contacts" -H "accept: application/json" -H "Content-Type: application/json" -d 
"{
  "firstName": "string",
  "lastName": "string",
  "description": "string",
  "organization": "string",
  "githubUserName": "burrsutter",
  "email": "meysam.tamkin@gmail.com",
  "phoneNumber": "+098 (707) 777-1234",
  "address": "string"
}"
  • Search contact:
curl -X GET "https://localhost:8080/contacts?search=address:string,lastName:meysam" -H "accept: application/json"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published