Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse filesFiles changed (2)
- Dockerfile+2-2
- server.cjsAdded+18
9 unmodified lines1011121314159 unmodified linesCOPY --from=build /app/dist ./distCOPY --from=build /app/package*.json ./RUN npm install --only=productionCOPY server.js ./EXPOSE 7860CMD ["node", "server.js"]9 unmodified lines1011121314159 unmodified linesCOPY --from=build /app/dist ./distCOPY --from=build /app/package*.json ./RUN npm install --only=productionCOPY server.cjs ./EXPOSE 7860CMD ["node", "server.cjs"]
123456789101112131415161718const express = require('express');const path = require('path');const app = express();const port = 7860;
app.use(express.static(path.join(__dirname, 'dist')));
app.get('/health', (req, res) => { res.status(200).send('OK');});
app.get('*', (req, res) => { res.sendFile(path.join(__dirname, 'dist', 'index.html'));});
app.listen(port, () => { console.log(`Server running on port ${port}`);});Dockerfile+2-2
server.cjsAdded+18