Armingodiz / web-project

Web Programming final project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

web-project

Web Programming final project

Installation

run docker-compose up --build

Endpoints

signup

{
   "name": "signup",
   "url": "http://localhost:3000/users/signup",
   "method": "POST",
   "body": {
    "type": "json",
    "raw": {
      "user_name" : "armin2",
      "password" : "armin21234"
    }
   }
}

Login

{
 "name": "login",
 "url": "http://localhost:3000/users/login",
 "method": "POST",
 "body": {
  "type": "json",
  "raw": {
   "user_name": "armin1",
   "password": "armin11234"
  }
 }
}

Add url

{
 "name": "add url",
 "url": "http://localhost:3000/urls",
 "method": "POST",
 "body": {
  "type": "json",
  "raw": {
   "user_name": "armin1",
   "address": "aut.ac.ir",
   "treshold": 2
  }
 },
 "auth": {
  "type": "bearer",
  "bearer": "your token"
 }
}

Get urls for user

  {
   "name": "get urls",
   "url": "http://localhost:3000/urls",
   "method": "GET",
   "auth": {
    "type": "bearer",
    "bearer": "your token"
   }
  }

Get url detailes

{
 "name": "get url",
 "url": "http://localhost:3000/urls/:url_id",
 "method": "GET",
 "auth": {
  "type": "bearer",
  "bearer": "your token"
 }
}

Get Alerts for an url

  {
   "name": "get alerts",
   "url": "http://localhost:3000/alerts/:url_id",
   "method": "GET",
   "auth": {
    "type": "bearer",
    "bearer": "your token"
   }
  }

About

Web Programming final project

License:MIT License


Languages

Language:Go 96.7%Language:Dockerfile 1.8%Language:Shell 1.5%