Solutions database and reports processor
Adapt when appropriate.
- Run
git remote add heroku https://git.heroku.com/nanoserver.git
- Run
heroku login
- Run
heroku addons:create heroku-postgresql:hobby-dev
- Run
heroku config:set MY_DB_SECRET=BXJVcouAWC9Fg8iKmVBDITCbzqqJ8Jf6
- Run
git push heroku master
All request payloads must be JSON. The entirety or part of request payload may be ignored, depending on the endpoint.
For endpoints that requires authentication, the request payload must have:
auth: string|undefined
- Authentication key, if production.
All response payloads will be JSON. Beside content specific to endpoint, the response payload will also have:
success: boolean
- Result state.message: string|undefined
- Result message, if any.
Debug endpoints will send back formatted JSON, others minified.
Some endpoints may be disabled.
Do nothing.
Do nothing, request payload not read.
Send back request headers and payload.
Request payload:
...*: ...Any
- Anything.
Response payload:
headers: Object
- Request headers.payload: Any
- Request payload.
Initialize database.
Vacuum database.
Get debug information.
Response payload:
method: string
- Request method.url: string
- Request URL.host: string
- Host header.ip: string
- Request IP.proto: string
- Request protocol.ua: string
- Request user agent.headers: Object
- Request headers.socket_ip: string
- IP of proxy server, or request IP if there is no proxy.started: string
- Time when server started.production: boolean
- Server mode.
Same as GET /info
, payload not read.
Read entry of map.
Request payload:
key: string
- Entry key.
Write entry of map.
Request payload:
key: string
- Entry key.val: string
- Entry value.
Same as GET /
.
Same as POST /
.
Read any reports in any order, up to 20 at a time.
Response payload:
val: Array
- Reports.
Send a report.
Request payload:
dry: boolean|Any
- Set to true for dry run.app: string
- Host extension name.ver: string
- Host extension version.cat: string
- Report category.url: string
- Report URL.msg: string
- Report message.
Delete a report.
Request payload:
id: string
- Serial number.
Lookup solution.
Request payload:
dom: string
- Domain.
Response payload:
val: string|null
- Solution, if exists.
Create or update solution.
Request payload:
dom: string
- Domain.sol: string
- Solution.
Delete solution.
Request payload:
dom: string
- Domain.
Clear call throttle for calling IP.