Coder Social home page Coder Social logo

go-grpc-product-service's Introduction

52b2763487b447e8aa1a5ff403712e19

Installation

$ make proto

Create a new database named product_svc

Running the app

$ make server

Running both services using Makefile

First run API gateway Then run Auth service Then run Product service

Curl commands

Register User

curl --request POST --url http://localhost:3000/auth/register --header 'Content-Type:application/json' --data '{"email": "[email protected]","password": "
admin"}'

Login User

curl --request POST --url http://localhost:3000/auth/login --header 'Content-Type:application/json' --data '{"email": "[email protected]","password": "
admin"}'

Create Product

curl --request POST --url http://localhost:3000/product --header 'Authorization: Bearer YOUR_TOKEN' --header 'Content-Type: application/json' --data '{ "name": "Product A", "stock": 5, "price": 15}'

Find One Product

curl --request POST --url http://localhost:3000/product/1 --header 'Authorization: Bearer YOUR_TOKEN'

How to install make command in windows

make is a GNU command so the only way you can get it on Windows is installing a Windows version like the one provided by GNUWin32. Anyway, there are several options for getting that:

The most simple choice is using Chocolatey. First you need to install this package manager. Once installed you simlpy need to install make (you may need to run it in an elevated/admin command prompt) :

choco install make

Other recommended option is installing a Windows Subsystem for Linux (WSL/WSL2), so you'll have a Linux distribution of your choice embedded in Windows 10 where you'll be able to install make, gccand all the tools you need to build C programs.

For older Windows versions (MS Windows 2000 / XP / 2003 / Vista / 2008 / 7 with msvcrt.dll) you can use GNUWin32.

An outdated alternative was MinGw, but the project seems to be abandoned so it's better to go for one of the previous choices.

go-grpc-product-service's People

Contributors

jamalkaksouri avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.