Skip to content

RintaroNagano/backend_tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sign-server

概要

@SaKu2110まで

実装した機能

  • [GET] /ping

    • Request: なし
    • Response: {"message": "ping"} / HttpStatusCode(200)
  • [POST] /signin

    • Request: Header: UserId string, Password string
    • Response: {"token": 任意の文字列} / HttpStatusCode(200)
  • [POST] /signup

    • Request: Header: UserId string, Password string
    • Response: {"token": 任意の文字列} / HttpStatusCode(201)

実行手順

  1. git clone "URL about this repo"
  2. cd backend_tutorial
  3. cp .env.sample .env
  4. docker compose up
  5. curl -c cookie.txt -X POST --url http://localhost:8080/signup -d 'UserId=rintaro' -d 'Password=pass'
  6. curl -b cookie.txt -X POST --url http://localhost:8080/signin -d 'UserId=rintaro' -d 'Password=pass'

About

Backend tutorial by Golang. Authentication based on JWT.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors