tmp
This commit is contained in:
@@ -31,7 +31,6 @@ AppDataSource.initialize().then(async () => {
|
||||
|
||||
// create express app
|
||||
const app = express()
|
||||
app.use(bodyParser.json())
|
||||
app.use(session({
|
||||
secret: ownConfig.sessionSecret,
|
||||
resave: false,
|
||||
@@ -39,21 +38,8 @@ AppDataSource.initialize().then(async () => {
|
||||
}))
|
||||
app.set('etag', false);
|
||||
|
||||
initPKIjs();
|
||||
|
||||
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
|
||||
app.listen(ownConfig.port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user