tmp
This commit is contained in:
@@ -31,7 +31,6 @@ AppDataSource.initialize().then(async () => {
|
|||||||
|
|
||||||
// create express app
|
// create express app
|
||||||
const app = express()
|
const app = express()
|
||||||
app.use(bodyParser.json())
|
|
||||||
app.use(session({
|
app.use(session({
|
||||||
secret: ownConfig.sessionSecret,
|
secret: ownConfig.sessionSecret,
|
||||||
resave: false,
|
resave: false,
|
||||||
@@ -39,21 +38,8 @@ AppDataSource.initialize().then(async () => {
|
|||||||
}))
|
}))
|
||||||
app.set('etag', false);
|
app.set('etag', false);
|
||||||
|
|
||||||
initPKIjs();
|
|
||||||
|
|
||||||
app.use('/', rootRouter);
|
app.use('/', rootRouter);
|
||||||
|
|
||||||
await fs.mkdir(certDirPath, { recursive: true });
|
|
||||||
if (!existsSync(rootSignKeyPath)) {
|
|
||||||
console.info('generate sign key');
|
|
||||||
generateRootSignKey();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!existsSync(rootCertPath)) {
|
|
||||||
console.info('generate root certificate');
|
|
||||||
await generateRootCertificateEasy();
|
|
||||||
}
|
|
||||||
|
|
||||||
// start express server
|
// start express server
|
||||||
app.listen(ownConfig.port)
|
app.listen(ownConfig.port)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user