fortune cgi
1.0.0
無服務的財富(6)微服務。
$ ./fortune-cgi/fortune.cgi
Content-Type: text/json
{
"id": 124,
"fortune": "It may or may not be worthwhile, but it still has to be done.n"
}
實時演示環境:https://sjmulder.nl/fortune
第一個編譯:
$ sudo apt install build-essential libsqlite3-dev libyajl-dev
$ make
這產生了fortune.db和fortune-cgi/fortune.cgi 。
fortune.cgi放在您無服務器平台的cgi-bin/存儲容器中。fortune.db放在其旁邊,或將其放置在其他地方,然後將FORTUNE_DB設置在環境基礎架構AS-AS代碼配置中。 Sijmen J. Mulder([email protected])。請參閱許可證。