server.js
501 bytes
| 1 | import { loadConfig } from "./config.js"; |
|---|---|
| 2 | import { createStore } from "./db.js"; |
| 3 | import { createGitHubClient } from "./github.js"; |
| 4 | import { createApp } from "./app.js"; |
| 5 | |
| 6 | const config = loadConfig(); |
| 7 | const store = createStore(config.databasePath, config.sessionSecret); |
| 8 | const github = createGitHubClient({ ...config.github, baseUrl: config.baseUrl }); |
| 9 | const app = createApp({ config, store, github }); |
| 10 | |
| 11 | app.listen(config.port, () => { |
| 12 | console.log(`profileShare is running at ${config.baseUrl}`); |
| 13 | }); |
| 14 | |