ip-calc-practice-api

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ip-calc-api

IPアドレス計算アプリのAPI(バックエンド)

事前準備

DB:複数対応したいところですが、現状MySQL(SSLなし、証明書なし)のみ対応しています。 DB migrate:golang-migrateをインストールしておいてください。

インストール方法

お好きなDB名でDATABASEを作成しておいてください。 ※エンジンはInnoDB、文字コードはutf8mb4を利用します。

CREATE DATABASE IF NOT EXISTS `{{ DB名 }}`;

次に ip-calc-api.sql 内にある connect.toml にDBの接続情報を記載してください。 接続するUSERは先程作成したDBに対してすべての権限を付与しておいてください。 ※現状、TLSの設定は触らないでください。  接続できません。

その後、ターミナルに戻ってインストール作業を実施してください。 インストール先等のディレクトリの変更を実施したい場合は、お手数ですが Makefile を直接編集してください。 configure ファイルは気がむいたら作るかもしれません。

$ make init
$ make build
$ make db
$ sudo make install
$ sudo make start

待ち受けポートを変更したい場合、 main.go の LISTEN_PORT を変更してください。

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址