Skip to content

sfcclip/connect

Repository files navigation

Connect

An advertising backend server and its web interface. Built for SFC CLIP.

Usage

  • /console
    • Web interface
  • /api
    • The root of API, which follows JSON API scheme
    • Endpoints:
      • POST/GET/PATCH/DELETE /api/units
      • POST/GET/PATCH/DELETE /api/groups
      • GET /api/records?page[limit]={limit}&page[offset]={offset}
  • GET /any/{GroupID}
    • Return an ID of the fewest accessed unit in the specified group
  • GET /img/{UnitID}
    • Redirect to the registered image of the specified unit, and record an access
  • GET /open/{UnitID}
    • Redirect to the registered URL of the specified unit, and record an access

Requirements

  • go
  • Node.js v16.14.0
  • MySQL / SQLite3

Development

npm --prefix console install
npm --prefix console run dev

go get
go run main.go

Build and run

  • .env.sampleをコピーして.envを作る
  • .envの認証情報を適宜編集
npm --prefix console install
npm --prefix console run build

go get
go build
./connect --port=PORT --production=1

About

SFC CLIP Ad Management System

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages