• Key Features
• Installing Using Github
• Installing Using Docker
• End Point
• Technologi that i use
• Contact me
- Product
- Category
- Images
installing and running the app from github repository
To clone and run this application, you'll need Git and Golang installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/reski-id/productAPI.git
# Go into the repository
$ cd productAPI
# Install dependencies
$ go get
# load .env env
# use bash cmd and type this..
$ source .env
# Run the app
$ go run main.go
Note Make sure you allready create database mysql
dbproduct
for this app.more info in local.env
file.
if you are using docker or aws/google cloud server you can run this application by creating a container.
# Pull this latest app from dockerhub
$ docker pull programmerreski/productapi
# if you have mysql container you can skip this
$ docker pull mysql
$ docker run --name mysqlku -p 3306:3306 -d -e MYSQL_ROOT_PASSWORD="yourmysqlpassword" mysql
# create app container
$ docker run --name productapi -p 80:8000 -d --link mysqlku -e SECRET="secr3t" -e SERVERPORT=8000 -e Name="productapi" -e Address=mysqlku -e Port=3306 -e Username="root" -e Password="yourmysqlpassword" programmerreski/productapi
# Run the app
$ docker logs productapi
Product
Methode | End Point | used for |
---|---|---|
GET |
/products | Get all products |
DELETE |
/products/:id | Delete product |
PUT |
/products/:id | Update data product |
POST |
/products | Insert product |
Category
Methode | End Point | used for |
---|---|---|
GET |
/category | Get all categories |
DELETE |
/category/:id | Delete category |
PUT |
/category/:id | Update data category |
POST |
/category | Insert category |
Images
Methode | End Point | used for |
---|---|---|
GET |
/file | Get all Images |
DELETE |
/file/:id | Delete Image |
PUT |
/file/:id | Update data Image |
POST |
/file | Insert Image |
Product-Category
Methode | End Point | used for |
---|---|---|
GET |
/productcategory | Get all product categories |
GET |
/productcategory/:id | Get one product categories |
DELETE |
/productcategory/:id | Delete product category |
PUT |
/productcategory/:id | Update data product category |
POST |
/productcategory | Insert product category |
Product-Images
Methode | End Point | used for |
---|---|---|
GET |
/productimages | Get all product images |
GET |
/productimages/:id | Get one product images |
DELETE |
/productimages/:id | Delete product images |
PUT |
/productimages/:id | Update data product images |
POST |
/productimages | Insert product images |
This software uses the following Tech:
feel free to contact me ...
- Email [email protected]
- Github
- Whatsapp Send WhatsApp Message