keycloak-demo/index.js

16 lines
392 B
JavaScript
Raw Normal View History

2021-09-01 11:30:21 +00:00
require("dotenv").config();
2021-08-31 10:24:42 +00:00
2021-09-01 11:30:21 +00:00
const config = require("src/config/index.js");
const { new: newCacheInstance } = require("src/utils/cache.js");
const app = require("./server.js");
2021-08-31 10:24:42 +00:00
async function runServer() {
2021-09-01 11:30:21 +00:00
newCacheInstance();
2021-08-31 10:24:42 +00:00
const server = app.listen(config.server.port, () => {
// @ts-ignore
console.info(`server start on port ${server.address().port}`);
});
}
runServer();