working on droplet, adding app components

This commit is contained in:
Sam
2026-03-10 21:15:47 +00:00
parent fc81da9743
commit 4d2c515b7d
10 changed files with 303 additions and 18 deletions

View File

@@ -17,12 +17,14 @@ import Database from "./db/db.js"
import AuthHandler from './auth.js';
import PaymentsHandler from "./payments.js"
import parchment from '../apps/parchment/index.js';
class Server {
db;
auth;
UIPath = path.join(__dirname, '../ui')
DBPath = path.join(__dirname, '../db')
ComalPath = path.join(os.homedir(), 'Sites/comalyr.com')
ComalPath = path.join(os.homedir(), 'comalyr.com')
registerRoutes(router) {
/* Stripe */
@@ -75,7 +77,7 @@ class Server {
const contact = contactRaw.trim() ? JSON.parse(contactRaw) : [];
const members = db.members.getByNetwork(networkId)
let stripeMembers = await payments.getCustomers(networkId)
console.log("stripemenbers: ", stripeMembers)
// console.log("stripemenbers: ", stripeMembers)
res.json({
join,
@@ -263,6 +265,8 @@ class Server {
app.use(this.logRequest);
app.use(this.logResponse);
app.use('/apps/parchment', parchment.app);
let router = express.Router();
this.registerRoutes(router)
app.use('/', router);