cyberbeats/server.js

19 lines
549 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Cyber Beats - Express statik sunucu
// Tüm sesler saf Web Audio API ile tarayıcıda sentezlenir (mp3/wav yok).
const express = require('express');
const path = require('path');
const app = express();
const PORT = process.env.PORT || 3000;
// public/ klasörünü statik servis et
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'index.html'));
});
app.listen(PORT, () => {
console.log(`Cyber Beats sunucusu çalışıyor: http://localhost:${PORT}`);
});