2021-07-21から1日間の記事一覧
document_root = '~/'$ vi index.html hellohttp://localhost:10080/index.html WEB サーバを作る
$ go build server.go $ ./server $ curl http://localhost:8080/basic_auth \ -H "accept: application/json" \ -H "Authorization:Basic $(echo -n client_id:client_secret | openssl base64)" すると、 Successful Basic Authentication が表示される。 …
$ go build server.go $ ./server$ go build client.go $ ./client GO言語でTCP/IP通信をする - Qiita 他言語プログラマがgolangの基本を押さえる為のまとめ - Qiita
先にNode.jsをインストール Node.jsをインストール - MBP(はてな)server.js var http = require("http"); var basic_name = "simple-nodejs_member"; var basic_users = ["QWxhZGRpbjpvcGVuIHNlc2FtZQ=="]; function isUser(_auth) { for (var l=0; l
先にNode.jsをインストール Node.jsをインストール - MBP(はてな)($ node auth-api-server.js でエラーが出るため) $ npm install body-parser$ node auth-api-server.jsSafariで http://localhost:3000/books を開くと、認証していないため、 { "status": 4…