gongul / delivery-tracker

Delivery Tracking Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delivery Tracker

Delivery Tracking Service

Overview

Created for personal project purpose

  • Support for inquiring the details of Korean parcels (cj logistics,hanjin,epost)
  • Support for user service (registration, login etc..)
  • Admin page implementation
  • Provide real-time tracking service(Beta)

Usage

Created based on node version 8.

Install

git clone https://github.com/gongul/delivery-tracker.git

Setting

server/datasources.json.sample -> server/datasource.json Rename or Copy and edit file

{
  "db": {
    "name": "db",
    "connector": "memory"
  },
  "Email": {
    "name": "mail",
    "connector": "mail",
    "transports": [{
      "type": "SMTP",
      "host": "smtp.gmail.com",
      "secure": true,
      "port": 465,
      "auth": {
        "user": "yourMail@gmail.com",  // please change to your gmail
        "pass": "password" // please change to your password 
      }
    }]
  }
}

Run

npm install

npm start 

If not defined npm_config_node_gyp If there is an error like this, correct it by the method below.(Windows)
npm install --global --production windows-build-tools

Example

Examples are not provided separately, You'll need to go into the link below and check it out.

A test account is created automatically when the server runs.

 {"email":"admin@admin.com", "password":"admin", "username":"admin"}
 {"email":"user@user.com", "password":"user", "username":"user"}

GET localhost/explorer

example

POST localhost/api/users/login (Login API)

Request
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"email":"admin%40admin.com","password":"admin"}' 'http://localhost/api/users/login'
Response
{
  "id": "OQDU8FMYn44dylqBiQbSLbtwCwmux5VCADuJsvAxniFegPiMA0vM0YBKI1Dcgb58",
  "ttl": 1209600,
  "created": "2019-08-26T09:41:22.985Z",
  "userId": "admin@admin.com"
}

GET localhost/admin?access_token=?{accessToken} (Admin Page)

Request
curl -X GET --header 'Accept: application/json' 'http://localhost/api/users/admin?access_token=OQDU8FMYn44dylqBiQbSLbtwCwmux5VCADuJsvAxniFegPiMA0vM0YBKI1Dcgb58'

Third Project

About

Delivery Tracking Service


Languages

Language:JavaScript 68.5%Language:HTML 23.8%Language:CSS 7.2%Language:Dockerfile 0.5%