Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Login microservice

This repo uses as an example using echo framework, moreover it uses as a template for REST based micorservice.

🏆 prerequisites

  • go 1.12 + .

⚡ How to compile & run locally

  • 🍴 clone git repo git clone https://github.com/matankila/login.git.
  • 🔬 open cmd in the folder.
  • 🔨 build - the following go build ./cmd/main
    • 🏃 for windows: run the main.exe through terminal / ui.
    • 🏃 for linux: run ./main through terminal.

⚡ How to build & run dockerfile

  • 🍴 clone git repo git clone https://github.com/matankila/login.git.
  • 🔬 open cmd in the folder.
  • 🔨 build - docker build -t matan:v1 .
  • 🏃 run - docker run -p '8080:8080' --name matanC matan:v1
  • Have fun :)

📐 Curls for testing

  • 👍 curl -k -X GET http://localhost:8080/health
  • 👎 curl -X POST http://localhost:8080/auth/login -d '{"mail": "test", "password": "test"}' -H 'content-type: application/json'
  • 👍 curl -X POST http://localhost:8080/auth/login -d '{"mail": "test3", "password": "test"}' -H 'content-type: application/json'
  • 👍 curl -X POST http://localhost:8080/auth/register -d '{"mail": "test", "password": "test", "firstName": "test", "lastName": "test"}' -H 'content-type: application/json'

About

login ms

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages