// Require the framework and instantiate it const fastify = require("fastify")({ logger: true }); // Declare a route fastify.get("/discovery/", async (request, reply) => { return { auctionHouseInfo: [ { auctionHouseURI: "http://localhost:3501", webSubURI: "http://example.org", taskTypes: ["COMPUTATION", "RANDOMTEXT"], timeStamp: "2021-12-24 12:00:00", groupName: "Group3", }, { auctionHouseURI: "http://localhost:3502", webSubURI: "http://facemash.com", taskTypes: ["BIGROBOT"], timeStamp: "2021-12-24 12:00:00", groupName: "Group2", }, ], }; }); // Run the server! const start = async () => { try { await fastify.listen(3501); } catch (err) { fastify.log.error(err); process.exit(1); } }; start();