Initial commit
This commit is contained in:
commit
9d63377fda
6 files changed
+385
No files matched your search
@@ -0,0 +1,16 @@
|
||||
// Beispielanwendung fuer die Hilfebilder: haelt keine Daten, braucht keine Datenbank.
|
||||
const http = require('http');
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
http
|
||||
.createServer((req, res) => {
|
||||
if (req.url === '/health') {
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ status: 'ok' }));
|
||||
return;
|
||||
}
|
||||
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
||||
res.end('<!doctype html><meta charset="utf-8"><title>Beispiel-App</title>' +
|
||||
'<h1>Beispiel-App</h1><p>Diese Seite dient den Bildern der VCH-Hilfe.</p>');
|
||||
})
|
||||
.listen(port, () => console.log('listening on ' + port));
|
||||
Reference in new issue
Block a user