-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed ajv keywords dependencies for ajv-validator/ajv-keywords#164
- Loading branch information
Showing
6 changed files
with
7,800 additions
and
1,416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,4 +161,6 @@ killzone.forEach((element, index) => { | |
afterhtmlpopulate: function() { | ||
|
||
} | ||
,customClearControl:function(){ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
const pinoInspector = require('pino-inspector') | ||
const path = require('path') | ||
const fs = require('fs') | ||
const fastify = require('fastify')({ | ||
// logger: { prettyPrint: true, level: 'debug', prettifier: pinoInspector }, | ||
ajv: { | ||
plugins: [[require('ajv-keywords'), ['transform']]] | ||
} | ||
}) | ||
fastify.register(require('fastify-multipart')) | ||
const pinoInspector = require("pino-inspector"); | ||
const path = require("path"); | ||
|
||
const fastify = require("fastify")({ | ||
logger: { prettyPrint: true, level: "debug", prettifier: pinoInspector }, | ||
// ajv: { | ||
// plugins: [[require("ajv-keywords"), ["transform"]]], | ||
// }, | ||
}); | ||
fastify.register(require("fastify-multipart")); | ||
|
||
fastify.register( | ||
require('fastify-compress'), | ||
require("fastify-compress"), | ||
{ global: false }, | ||
{ encodings: ['gzip'] } | ||
) | ||
{ encodings: ["gzip"] } | ||
); | ||
|
||
fastify.register(require('point-of-view'), { | ||
fastify.register(require("point-of-view"), { | ||
engine: { | ||
ejs: require('ejs') | ||
ejs: require("ejs"), | ||
}, | ||
root: path.join(__dirname, '../views') | ||
}) | ||
fastify.register(require('fastify-cors')) | ||
fastify.register(require('fastify-jwt'), { | ||
secret: 'supersecret', | ||
expiresIn: '1h' | ||
}) | ||
root: path.join(__dirname, "../views"), | ||
}); | ||
fastify.register(require("fastify-cors")); | ||
fastify.register(require("fastify-jwt"), { | ||
secret: "supersecret", | ||
expiresIn: "1h", | ||
}); | ||
|
||
fastify.register(require('fastify-static'), { | ||
root: path.join(__dirname, '../') + '/public' | ||
fastify.register(require("fastify-static"), { | ||
root: path.join(__dirname, "../") + "/public", | ||
// optional: default '/' | ||
}) | ||
}); | ||
|
||
fastify.register(require('fastify-secure-session'), { | ||
secret: 'averylogphrasebiggerthanfortytwochars', | ||
salt: 'mq9hDxBVDbspDR6n', | ||
fastify.register(require("fastify-secure-session"), { | ||
secret: "averylogphrasebiggerthanfortytwochars", | ||
salt: "mq9hDxBVDbspDR6n", | ||
cookie: { | ||
path: '/' | ||
path: "/", | ||
// options for setCookie, see https://github.com/fastify/fastify-cookie | ||
} | ||
}) | ||
fastify.register(require('../../app/config/baseAuth')) | ||
fastify.register(require('../routes/customauth'), { prefix: '/' }) | ||
fastify.register(require('../routes/utils/misc/jynerso'), { | ||
prefix: '/black-squadron' | ||
}) | ||
let baseroutes = require('../config/baseRoute') | ||
}, | ||
}); | ||
fastify.register(require("../../app/config/baseAuth")); | ||
fastify.register(require("../routes/customauth"), { prefix: "/" }); | ||
fastify.register(require("../routes/utils/misc/jynerso"), { | ||
prefix: "/black-squadron", | ||
}); | ||
let baseroutes = require("../config/baseRoute"); | ||
baseroutes.forEach(function (dt) { | ||
fastify.register(require(`../routes/${dt.val}`), { prefix: dt.key }) | ||
}) | ||
fastify.register(require(`../routes/${dt.val}`), { prefix: dt.key }); | ||
}); | ||
|
||
// Run the server! | ||
fastify.listen(3011, function (err, address) { | ||
if (err) { | ||
fastify.log.error(err) | ||
process.exit(1) | ||
fastify.log.error(err); | ||
process.exit(1); | ||
} | ||
console.log(`App Server listening on port ${address}`) | ||
}) | ||
fastify.register(require('fastify-socket.io'), { | ||
console.log(`App Server listening on port ${address}`); | ||
}); | ||
fastify.register(require("fastify-socket.io"), { | ||
// put your options here | ||
}) | ||
}); | ||
// //using express for only swagger panel | ||
var express = require('express') | ||
var Swaggerapp = express() | ||
const swaggerSpec = require('./configuration/swagger') | ||
const swaggerUi = require('swagger-ui-express') | ||
Swaggerapp.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec)) | ||
var express = require("express"); | ||
var Swaggerapp = express(); | ||
const swaggerSpec = require("./configuration/swagger"); | ||
const swaggerUi = require("swagger-ui-express"); | ||
Swaggerapp.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerSpec)); | ||
Swaggerapp.listen(3012, function () { | ||
console.log('Swagger Server listening on http://localhost:3012/api-docs/') | ||
}) | ||
console.log("Swagger Server listening on http://localhost:3012/api-docs/"); | ||
}); |
Oops, something went wrong.