Changed including method of index.js

This commit is contained in:
Alexander Cerutti
2018-06-06 23:34:32 +02:00
parent 2efe0f55f1
commit 74700fedd0

View File

@@ -1,5 +1,7 @@
const express = require("express"); const express = require("express");
const { RequestHandler } = require("./index") const passkit = require("./index");
passkit.init("./config.json");
const instance = express(); const instance = express();
@@ -13,5 +15,5 @@ instance.get("/", function (request, response) {
response.send("Hello there!"); response.send("Hello there!");
}); });
instance.get("/gen/:type/", RequestHandler); instance.get("/gen/:type/",passkit.RequestHandler);
instance.post("/gen/:type/", RequestHandler); instance.post("/gen/:type/", passkit.RequestHandler);