added ahCrawler and finished discovery endpoint
This commit is contained in:
35
mocks/auction-house/discoveryEndpoin2.js
Normal file
35
mocks/auction-house/discoveryEndpoin2.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// 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();
|
35
mocks/auction-house/discoveryEndpoin3.js
Normal file
35
mocks/auction-house/discoveryEndpoin3.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// 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:3502",
|
||||
webSubURI: "http://example.org",
|
||||
taskTypes: ["COMPUTATION", "RANDOMTEXT"],
|
||||
timeStamp: "2021-12-24 12:00:00",
|
||||
groupName: "Group3",
|
||||
},
|
||||
{
|
||||
auctionHouseURI: "http://localhost:3501",
|
||||
webSubURI: "http://facemash.com",
|
||||
taskTypes: ["BIGROBOT"],
|
||||
timeStamp: "2021-12-26 12:00:00",
|
||||
groupName: "GroupHAHAHA222",
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
|
||||
// Run the server!
|
||||
const start = async () => {
|
||||
try {
|
||||
await fastify.listen(3502);
|
||||
} catch (err) {
|
||||
fastify.log.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
start();
|
35
mocks/auction-house/discoveryEndpoint.js
Normal file
35
mocks/auction-house/discoveryEndpoint.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// 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:3500",
|
||||
webSubURI: "http://example.org",
|
||||
taskTypes: ["COMPUTATION", "RANDOMTEXT"],
|
||||
timeStamp: "2021-12-24 12:00:00",
|
||||
groupName: "Group3",
|
||||
},
|
||||
{
|
||||
auctionHouseURI: "http://localhost:3501",
|
||||
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(3500);
|
||||
} catch (err) {
|
||||
fastify.log.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
start();
|
Reference in New Issue
Block a user