Skip to content

About

Simple Rest API using echo framework

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

Simple-rest-api

create simple API using echo framework

Getting Started

in this repository we will implement echo framework to create APIs that implement common http methods namely GET, POST, PUT, DELETE.

Prerequisites

some things that must have or be installed to run this program :

Create Table

To create a table you can copy the script in the /script/*.sql folder and run in your database

Configuration

Name Type Default Required Example Value
Port String :8888 Yes :8080
DBName String - Yes example_database
DBProtocol String - Yes tcp
DBHost String - Yes localhost
DBPort String - Yes 3360
DBUser String - Yes root
DBPass String - Yes administrator

Running

clone repository :

git clone https://github.com/Alfabetss/simple-rest-api.git

open terminal :

cd path/to/program

run the program :

go run server.go

open new terminal, and run :

curl "http://localhost:1122/talent" \
  -X POST \
  -d "{\n  \"name\": \"robert jr\",\n  \"experience\": [\n    {\n      \"companyName\": \"marvel\"\n    },\n    {\n      \"companyName\": \"sony\"\n    }\n  ]\n}" \
  -H "Content-Type: application/json" 

Built With

  • Echo - The web framework used
  • squirrel - The Query Builder
  • viper - The Configuration tools

About

Simple Rest API using echo framework

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址