mirror of
https://github.com/gauvainboiche/ketapk.git
synced 2026-09-02 11:13:11 +02:00
19 lines
528 B
JavaScript
19 lines
528 B
JavaScript
const express = require('express');
|
|
const cors = require('cors');
|
|
const path = require('path');
|
|
|
|
const app = express();
|
|
const PORT = process.env.PORT || 3000;
|
|
|
|
app.use(cors());
|
|
app.use(express.json());
|
|
|
|
// Serve the calculation engine located at the root
|
|
app.use('/pkCore.js', express.static(path.join(__dirname, '../pkCore.js')));
|
|
|
|
// Serve frontend static files
|
|
app.use(express.static(path.join(__dirname, '../frontend')));
|
|
|
|
app.listen(PORT, () => {
|
|
console.log(`Serveur KétaPK démarré sur http://localhost:${PORT}`);
|
|
}); |