Skip to content

Commit 6db36f4

Browse files
committed
manifest.json uses env appliaction name
1 parent 2602578 commit 6db36f4

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/app.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,37 @@ app.use('/api/v1', apiv1);
108108
app.use('/i', images_handler);
109109
// app.use('/auth', auth_handler);
110110

111+
app.get('/manifest.json', (req, res) => {
112+
res.header('Content-Type', 'application/json');
113+
114+
res.json({
115+
"name": process.env.APPLICATION || "Strichliste",
116+
"short_name": "Strichliste",
117+
"description": "Eine App zur Verwaltung von Strichlisten.",
118+
"start_url": "/",
119+
"display": "standalone",
120+
"background_color": "#ffffff",
121+
"theme_color": "#3367D6",
122+
"icons": [
123+
{
124+
"src": "/favicon.ico",
125+
"sizes": "48x48",
126+
"type": "image/x-icon"
127+
},
128+
{
129+
"src": "/icons/icon-192.png",
130+
"type": "image/png",
131+
"sizes": "192x192"
132+
},
133+
{
134+
"src": "/icons/icon-512.png",
135+
"type": "image/png",
136+
"sizes": "512x512"
137+
}
138+
]
139+
})
140+
})
141+
111142
app.get('/*', (req, res) => {
112143
// Split the URL to separate the path and query string
113144
const rawUrl = req.url.split('?')[0];

0 commit comments

Comments
 (0)