Initial commit: Anki flashcard creator web app

Converts Japanese vocab (Kanji/Hiragana/English) to Anki CSV format.
Served on port 4002 with a dark-themed two-panel UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adyrem
2026-05-19 14:58:24 +02:00
commit 0a4659f7e6
3 changed files with 382 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
const http = require('http');
const fs = require('fs');
const path = require('path');
const PORT = 4002;
const ROOT = __dirname;
const mime = {
'.html': 'text/html',
'.css': 'text/css',
'.js': 'text/javascript',
};
http.createServer((req, res) => {
const urlPath = req.url === '/' ? '/index.html' : req.url;
const file = path.join(ROOT, urlPath);
fs.readFile(file, (err, data) => {
if (err) {
res.writeHead(404);
res.end('Not found');
return;
}
const ext = path.extname(file);
res.writeHead(200, { 'Content-Type': mime[ext] || 'text/plain' });
res.end(data);
});
}).listen(PORT, () => {
console.log(`Anki FC Creator running at http://localhost:${PORT}`);
});