style: fix prettier formatting in docker-server files

Made-with: Cursor
This commit is contained in:
kritik.b 2026-04-16 11:14:23 +05:30
parent 473a6e5b77
commit 1019ee265a
3 changed files with 11 additions and 5 deletions

View file

@ -3,10 +3,10 @@ services:
image: ${IMAGE_NAME:-ghcr.io/abhigyanpatwari/gitnexus:latest}
container_name: ${CONTAINER_NAME:-gitnexus}
ports:
- "${HOST_PORT:-4173}:4173"
- '${HOST_PORT:-4173}:4173'
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4173/"]
test: ['CMD', 'curl', '-f', 'http://localhost:4173/']
interval: 30s
timeout: 5s
retries: 3

View file

@ -60,7 +60,9 @@ const server = createServer(async (req, res) => {
}
res.writeHead(200, {
'Cache-Control': filePath.includes('/assets/') ? 'public, max-age=31536000, immutable' : 'no-cache',
'Cache-Control': filePath.includes('/assets/')
? 'public, max-age=31536000, immutable'
: 'no-cache',
'Content-Type': contentTypes[extname(filePath)] || 'application/octet-stream',
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',

View file

@ -25,7 +25,9 @@ function rawGet(port, path) {
const req = http.request({ host: '127.0.0.1', port, path }, (res) => {
let body = '';
res.setEncoding('utf8');
res.on('data', (chunk) => { body += chunk; });
res.on('data', (chunk) => {
body += chunk;
});
res.on('end', () => resolve({ status: res.statusCode, headers: res.headers, body }));
});
req.on('error', reject);
@ -61,7 +63,9 @@ before(async () => {
env: { ...process.env, PORT: String(serverPort) },
stdio: 'pipe',
});
child.on('error', (err) => { throw err; });
child.on('error', (err) => {
throw err;
});
await waitForServer(serverPort);
});