mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 20:25:26 +00:00
Changed name for input model as parameter;
Added Joi to validate input parameters schema; Removed old draft of Pass class; Removed completely the old way to load the configuration
This commit is contained in:
12
server.js
12
server.js
@@ -4,8 +4,6 @@ const fs = require("fs");
|
||||
const Passkit = require("./index");
|
||||
const Configuration = require("./config.json");
|
||||
|
||||
Passkit.init(Configuration);
|
||||
|
||||
const instance = express();
|
||||
|
||||
instance.use(express.json());
|
||||
@@ -31,7 +29,17 @@ function manageRequest(request, response) {
|
||||
});
|
||||
|
||||
let pass = new Passkit.Pass({
|
||||
modelDir: "passModels/",
|
||||
modelName: request.params.modelName || request.query.modelName,
|
||||
certificates: {
|
||||
dir: "certificates/",
|
||||
wwdr: "WWDR.pem",
|
||||
signerCert: "passcertificate.pem",
|
||||
signerKey: {
|
||||
keyFile: "passkey.pem",
|
||||
passphrase: "123456"
|
||||
}
|
||||
},
|
||||
overrides: {}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user