API / index.js
Puruu Puruu
8065f56
raw
history blame
581 Bytes
/*
* Lokasi: index.js
* Versi: v2
*/
const express = require('express');
const upscaleFeature = require('./features/upscale.js');
const imageDescribeFeature = require('./features/image-describe.js');
const app = express();
const port = process.env.PORT || 7860;
app.use(express.json());
app.get('/', (req, res) => {
res.status(200).json({ status: 'ok', message: 'Worker server is running.' });
});
app.post('/upscale', upscaleFeature);
app.post('/image-describe', imageDescribeFeature);
app.listen(port, () => {
console.log(`Worker server listening on port ${port}`);
});