An API Server for Run The FNC-1 Model
You should run both api server
and agent
.
You should select one of options.
- Install AWS Cli Download Here
- Setup IAM Credential
$ aws configure --profile=fnc
Write aws credentials like below
credentials:
accessKeyId: DWDSESDE5N7I
secretAccessKey: dw32depoH+RmohMHhTPEc7HeNe0zRuvA2TrreK
stsRegion: ap-northeast-2
$ fakenews-server server
# Parameters
#--port=<int> : Rest API Listen Port, (Default 8080)
$ fakenews-server agent
# Parameters
#--interval=<duration> : The Agent Work Iteration Loop Interval (Default 10s)
#--once : Flag for not Loop Iteration (Default false=not-set)
# --config=<configPath> : Application config file
Method | Url | Body |
---|---|---|
GET | /api/v1/ping | |
POST | /api/v1/fakenews-analyze/ | {"title":"aaa","body":"bbbb"} |
GET | /api/v1/fakenews-analyze/:id | |
GET | /api/v1/fakenews-analyze/ |
curl http://localhost:8080/api/v1/ping
curl http://localhost:8080/api/v1/fakenews-analyze/
curl http://localhost:8080/api/v1/fakenews-analyze/71a09766-d1a8-11ec-b4f4-c26f8fc1fbdc
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/fakenews-analyze -d @curlinput.json