GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    zunda (zundan@mastodon.zunda.ninja)'s status on Tuesday, 06-Dec-2022 11:06:25 JST zunda zunda
    • かき@GNUsocialJP

    件のスクリプトがどうやって自分を返してるのか不思議だったんだけど1行目で読んでたね。

    $ cat index.js
    var code = require("fs").readFileSync(__filename, "utf8");
    var server = require("http").createServer(function(req, res) {
    try {
    res.writeHead(200, {"Content-Type": "text/javascript"});
    res.end(code);
    } catch {
    res.writeHead(500);
    res.end();
    }
    });
    server.listen(8080);
    $ node index.js
    $ curl http://localhost:8080/
    var code = require("fs").readFileSync(__filename, "utf8");
    :

    In conversation Tuesday, 06-Dec-2022 11:06:25 JST from mastodon.zunda.ninja permalink

    Attachments


    Feeds

    • Activity Streams
    • RSS 2.0
    • Atom
    • Help
    • About
    • FAQ
    • TOS
    • Privacy
    • Source
    • Version
    • Contact

    GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

    Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.